Go: fmt: Add an example for Printf

Created on 29 Aug 2018  路  8Comments  路  Source: golang/go

What version of Go are you using (go version)?

go version go1.10 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vagrant/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/vagrant/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build279712786=/tmp/go-build -gno-record-gcc-switches"

What did you do?

See how to use the fmt.Printf function from an example in the docs.

What did you expect to see?

Examples at https://golang.org/pkg/fmt/

What did you see instead?

Only one example at https://golang.org/pkg/fmt/

Documentation FrozenDueToAge NeedsFix

Most helpful comment

@agnivade no worries! I'm just glad there are examples now.

All 8 comments

Change https://golang.org/cl/132057 mentions this issue: fmt: add an example for Printf function

was this a result of @kevinburke's talk? :)

Yup :)

Change https://golang.org/cl/135095 mentions this issue: fmt: add example for Printf

Hi @mooreds - adding any further examples to fmt has been superceded by https://github.com/golang/go/issues/27554 now as per @robpike 's comment.

Sorry for the troubles. I hope this does not discourage you from contributing again in the future ! Please do feel free to add examples in other packages or any other task that you want to pickup :)

If you have any doubts, please ask around in the forums. Thanks again for your effort.

Change https://golang.org/cl/145917 mentions this issue: fmt: add additional example for Printf.

Change https://golang.org/cl/145917 mentions this issue: fmt: add additional example for Printf.

@agnivade no worries! I'm just glad there are examples now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stub42 picture stub42  路  3Comments

rakyll picture rakyll  路  3Comments

michaelsafyan picture michaelsafyan  路  3Comments

natefinch picture natefinch  路  3Comments

bbodenmiller picture bbodenmiller  路  3Comments