cmd/cloner: mangle "go:generate" in cloner.go

The "go generate" command blindly looks for "//go:generate" anywhere
in the file regardless of whether it is truly a comment.
Prevent this false positive in cloner.go by mangling the string
to look less like "//go:generate".

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
This commit is contained in:
Joe Tsai
2021-10-14 12:51:28 -07:00
committed by Brad Fitzpatrick
parent def650b3e8
commit 9af27ba829
8 changed files with 17 additions and 17 deletions

View File

@ -131,7 +131,7 @@ const header = `// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserve
// license that can be found in the LICENSE file.
// Code generated by tailscale.com/cmd/cloner; DO NOT EDIT.
//go:generate go run tailscale.com/cmd/cloner %s
//` + `go:generate` + ` go run tailscale.com/cmd/cloner %s
package %s