diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-03 05:27:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-10-03 05:27:36 +0000 |
commit | bd2e46c8255fad4e75e589b3286ead560e910b39 (patch) | |
tree | 4f194bdb2e9edcc69ef2ab0dfb4aab15ca259267 /libgo/go/flag | |
parent | bed6238ce677ba18a672a58bc077cec6de47f8d3 (diff) | |
download | gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.zip gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.gz gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.bz2 |
libgo: Update to Go 1.0.3.
From-SVN: r192025
Diffstat (limited to 'libgo/go/flag')
-rw-r--r-- | libgo/go/flag/flag.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/flag/flag.go b/libgo/go/flag/flag.go index 5444ad1..bbabd88 100644 --- a/libgo/go/flag/flag.go +++ b/libgo/go/flag/flag.go @@ -33,7 +33,7 @@ After parsing, the arguments after the flag are available as the slice flag.Args() or individually as flag.Arg(i). - The arguments are indexed from 0 up to flag.NArg(). + The arguments are indexed from 0 through flag.NArg()-1. Command line flag syntax: -flag @@ -707,7 +707,7 @@ func (f *FlagSet) parseOne() (bool, error) { if fv, ok := flag.Value.(*boolValue); ok { // special case: doesn't need an arg if has_value { if err := fv.Set(value); err != nil { - f.failf("invalid boolean value %q for -%s: %v", value, name, err) + return false, f.failf("invalid boolean value %q for -%s: %v", value, name, err) } } else { fv.Set("true") |