diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-06-25 16:20:03 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-06-25 16:20:03 +0000 |
commit | 08a680a8879ce9da16d808644730f7cfacaf667f (patch) | |
tree | 5dfe28c3f573ae57b971ed4d9a1c99a76f0a70c4 /libgo/go/flag/flag.go | |
parent | 72de8622ae2d5aaeb58173f454aed87640a989b5 (diff) | |
download | gcc-08a680a8879ce9da16d808644730f7cfacaf667f.tar.gz |
libgo: Update to Go 1.0.2 release.
From-SVN: r188943
Diffstat (limited to 'libgo/go/flag/flag.go')
-rw-r--r-- | libgo/go/flag/flag.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/flag/flag.go b/libgo/go/flag/flag.go index f0842a18a29..5444ad141c5 100644 --- a/libgo/go/flag/flag.go +++ b/libgo/go/flag/flag.go @@ -620,8 +620,9 @@ func (f *FlagSet) Var(value Value, name string, usage string) { flag := &Flag{name, usage, value, value.String()} _, alreadythere := f.formal[name] if alreadythere { - fmt.Fprintf(f.out(), "%s flag redefined: %s\n", f.name, name) - panic("flag redefinition") // Happens only if flags are declared with identical names + msg := fmt.Sprintf("%s flag redefined: %s", f.name, name) + fmt.Fprintln(f.out(), msg) + panic(msg) // Happens only if flags are declared with identical names } if f.formal == nil { f.formal = make(map[string]*Flag) |