On Fri, 2021-10-08 at 15:33 -0700, Kamil Ziemian wrote: > Hello, > > I now read documentation of "fmt" package and in "Format errors" ( > https://pkg.go.dev/fmt@go1.17.2#hdr-Format_errors) we have > Invalid or invalid use of argument index: %!(BADINDEX) > Printf("%*[2]d", 7): %!d(BADINDEX) > Printf("%.[2]d", 7): %!d(BADINDEX) >
The fmt argument index is an index into args (1-based). You have a single argument here, 7, so 2 is invalid. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/34af9be577d2b06b0956c861c495fd45459675cd.camel%40kortschak.io.