diff options
author | Russ Cox <rsc@golang.org> | 2015-05-21 14:35:02 -0400 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-06-05 04:55:41 +0000 |
commit | 12795c02f3d6fc54ece09a86e70aaa40a94d5131 (patch) | |
tree | e823ba0f095be8debdd0a4a8440658801e27fab8 /test/linkx.go | |
parent | 630930c35ef7b5e22e28a6424425b887bb12c9b6 (diff) | |
download | go-12795c02f3d6fc54ece09a86e70aaa40a94d5131.tar.gz go-12795c02f3d6fc54ece09a86e70aaa40a94d5131.zip |
cmd/link: deprecate -X name value in favor of -X name=value
People invoking the linker directly already have to change their scripts
to use the new "go tool link", so this is a good time to make the -X flag
behave like all other Go flags and take just a single argument.
The old syntax will continue to be accepted (it is rewritten into the new
syntax before flag parsing). Maybe some day we will be able to retire it.
Even if we never retire the old syntax, having the new syntax at least
makes the rewriting much less of a kludge.
Change-Id: I91e8df94f4c22b2186e81d7f1016b8767d777eac
Reviewed-on: https://go-review.googlesource.com/10310
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'test/linkx.go')
-rw-r--r-- | test/linkx.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/linkx.go b/test/linkx.go index 151b6db1ec..40ec1b99f6 100644 --- a/test/linkx.go +++ b/test/linkx.go @@ -9,10 +9,12 @@ package main +import "fmt" + var tbd string var overwrite string = "dibs" func main() { - println(tbd) - println(overwrite) + fmt.Println(tbd) + fmt.Println(overwrite) } |