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)
I cannot understand what "Invalid or invalid use of argument index" was intended to mean? Can anyone help me with that? Best Kamil piątek, 8 października 2021 o 21:36:11 UTC+2 Kamil Ziemian napisał(a): > Hello, > > I found unimportant typo in English part of the documentation of "fmt". > How can I correct it? GitHub pull request or open issue "Unimportant typos > in documentation"? I don't know how I should treat such unimportant typo. > > Best > Kamil > piątek, 8 października 2021 o 00:53:11 UTC+2 Kamil Ziemian napisał(a): > >> > The io.ReadAll function and the io.Reader interface Read method are not >> the same, don't conflate them. >> Thank you for stressing that point, but I don't think that I conflate >> them. Maybe I wrong, but I believe that many entries in "io" package share >> decriptions that states "A successful call returns err == nil, not err == >> EOF. Because ReadAll is defined to read from src until EOF, it does not >> treat an EOF from Read as an error to be reported.", so I quote it just >> because it was at my hand. >> >> > Have you read https://go.dev/blog/errors-are-values by Rob Pike? >> Thank you very much Michael, I read few things about errors in Go, but >> never that blog post. Now I need for my job to process few files in Go, so >> I need to read "io" first, but after that, I will read this mail. In some >> sense I'm a fan of Rob Pike blog posts, articles and talks. Hard to say >> why, maybe he is "no nonsense guy"? >> >> Best >> Kamil >> czwartek, 7 października 2021 o 15:13:22 UTC+2 michael...@gmail.com >> napisał(a): >> >>> Kamil, >>> Have you read https://go.dev/blog/errors-are-values by Rob Pike? >>> Wrapping my head around the concept that an error is simply a value >>> returned from a function was tremendously helpful when I had questions >>> along the same lines as yours. >>> >> -- 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/3ccc88a8-419b-44af-8bdc-d96b59b2eb38n%40googlegroups.com.