1
0
mirror of https://github.com/golang/go synced 2024-10-03 08:21:21 -06:00
Commit Graph

6 Commits

Author SHA1 Message Date
Michalis Kargakis
bc611a31a5 flag: Check for Set error
Check for Set error when a boolean flag isn't explicitly given a value.

Fixes #9345

Change-Id: I97a1289f8cf27567d1a726ebe5ef167c800f357c
Reviewed-on: https://go-review.googlesource.com/1897
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2014-12-22 00:17:07 +00:00
Michalis Kargakis
f34964ed34 flag: Some idiomatic fixes
Make golint a bit happier

Change-Id: I8a14342f3e492e92bf5efa611f9ef91176624031
Reviewed-on: https://go-review.googlesource.com/1891
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-21 00:24:39 +00:00
Rob Pike
9070afb359 flag: roll back 156390043 (flag setting)
Shell scripts depend on the old behavior too often.
It's too late to make this change.

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/161890044
2014-10-20 13:28:00 -07:00
Rob Pike
8c29633368 flag: disallow setting flags multiple times
This is a day 1 error in the flag package: It did not check
that a flag was set at most once on the command line.
Because user-defined flags may have more general
properties, the check applies only to the standard flag
types in this package: bool, string, etc.

Fixes #8960.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/156390043
2014-10-19 10:33:22 -07:00
Rob Pike
b2487ef6a3 flag: allow CommandLine's Usage function to be set
Fixes #7779.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/147210043
2014-09-26 12:33:05 -07:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
Preparation was in CL 134570043.
This CL contains only the effect of 'hg mv src/pkg/* src'.
For more about the move, see golang.org/s/go14nopkg.
2014-09-08 00:08:51 -04:00