Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.tools
LGTM On 15 Sep 2013 10:11, <r@golang.org> wrote: > Reviewers: golang-dev1, > > Message: > Hello golang-dev@googlegroups.com, > > I'd like you to review this change to > https://code.google.com/p/go.**tools <https://code.google.com/p/go.tools> > > > Description: > go.tools/cmd/vet: update for fmt handling %b for complex numbers > Sort of blocked on 13715043. > > Please review this at https://codereview.appspot.**com/13490048/<https://codereview.appspot.com/134... > > Affected files (+4, -3 lines): > M cmd/vet/print.go > M cmd/vet/testdata/print.go > > > Index: cmd/vet/print.go > ==============================**==============================**======= > --- a/cmd/vet/print.go > +++ b/cmd/vet/print.go > @@ -308,7 +308,7 @@ > // '#' is alternate format for several verbs. > // ' ' is spacer for numbers > {'%', noFlag, 0}, > - {'b', numFlag, argInt | argFloat}, > + {'b', numFlag, argInt | argFloat | argComplex}, > {'c', "-", argRune | argInt}, > {'d', numFlag, argInt}, > {'e', numFlag, argFloat | argComplex}, > Index: cmd/vet/testdata/print.go > ==============================**==============================**======= > --- a/cmd/vet/testdata/print.go > +++ b/cmd/vet/testdata/print.go > @@ -67,6 +67,7 @@ > fmt.Printf("%F %F %F %F", 3e9, x, fslice, c) > fmt.Printf("%g %g %g %g", 3e9, x, fslice, c) > fmt.Printf("%G %G %G %G", 3e9, x, fslice, c) > + fmt.Printf("%b %b %b %b", 3e9, x, fslice, c) > fmt.Printf("%o %o", 3, i) > fmt.Printf("%p %p", p, nil) > fmt.Printf("%q %q %q %q", 3, i, 'x', r) > @@ -95,8 +96,8 @@ > fmt.Printf("%g", 1+2i) > // Some bad format/argTypes > fmt.Printf("%b", "hi") // ERROR "arg .hi. for > printf verb %b of wrong type" > - fmt.Printf("%b", c) // ERROR "arg c for > printf verb %b of wrong type" > - fmt.Printf("%b", 1+2i) // ERROR "arg 1 \+ 2i > for printf verb %b of wrong type" > + fmt.Printf("%t", c) // ERROR "arg c for > printf verb %t of wrong type" > + fmt.Printf("%t", 1+2i) // ERROR "arg 1 \+ 2i > for printf verb %t of wrong type" > fmt.Printf("%c", 2.3) // ERROR "arg 2.3 for > printf verb %c of wrong type" > fmt.Printf("%d", 2.3) // ERROR "arg 2.3 for > printf verb %d of wrong type" > fmt.Printf("%e", "hi") // ERROR "arg .hi. for > printf verb %e of wrong type" > > > -- > > ---You received this message because you are subscribed to the Google > Groups "golang-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegrou... > . > For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/o... > . >
*** Submitted as https://code.google.com/p/go/source/detail?r=f080ec4c3156&repo=tools *** go.tools/cmd/vet: update for fmt handling %b for complex numbers R=golang-dev, adg CC=golang-dev https://codereview.appspot.com/13490048