Skip to content

Commit

Permalink
only use constant string for string formatting
Browse files Browse the repository at this point in the history
noticed since go1.24rc1
  • Loading branch information
mjl- committed Dec 14, 2024
1 parent 48c2062 commit c289dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func main() {

func printFile(name string) {
f, err := fsys.Open(name)
xcheckf(err, "opening file "+name)
xcheckf(err, "opening file %s", name)
_, err = io.Copy(os.Stdout, f)
xcheckf(err, "copy")
err = f.Close()
Expand Down

0 comments on commit c289dc2

Please sign in to comment.