Thanks for your great work! It's very useful for developers like me. However I noticed a print error. It's not hard to fix, hope this pull request would be helpful
description
change Fprintfto Fprint
How Has This Been Tested?
The second parameter of fmt.Fprintf is 'format', therefore when there are something like "%s" in code, the print would be "%!s(MISSING)", just as shown below
func Fprintf(w io.Writer, format string, a ...any) (n int, err error) {
p := newPrinter()
p.doPrintf(format, a)
n, err = w.Write(p.buf)
p.free()
return
}
fmt.Fprint doesn't have parameter 'format', so the print will always be correct
func Fprint(w io.Writer, a ...any) (n int, err error) {
p := newPrinter()
p.doPrint(a)
n, err = w.Write(p.buf)
p.free()
return
}
👇 Click on the image for a new way to code review
- Make big changes easier — review code in small groups of related files
- Know where to start — see the whole change at a glance
- Take a code tour — explore the change with an interactive tour
- Make comments and review — all fully sync’ed with github
[Try it now!](https://app.codesee.io/r/reviews?pr=20&src=https%3A%2F%2Fgithub.com%2Fgofireflyio%2Faiac)
Hi @anccy. Thank you for the PR, and sorry for taking long in responding. This PR is no longer valid and the original bug it is describing had already been fixed. Closing. Thanks again.
Thanks for your great work! It's very useful for developers like me. However I noticed a print error. It's not hard to fix, hope this pull request would be helpful
description
change
Fprintf
toFprint
How Has This Been Tested?
The second parameter of
fmt.Fprintf
is 'format', therefore when there are something like "%s" in code, the print would be "%!s(MISSING)", just as shown belowfmt.Fprint
doesn't have parameter 'format', so the print will always be correct