Closed dkasak closed 5 years ago
This fixes the problem by using fmt.Sprintf in wiki/cmd/wiki/main.go
138c138
< fmt.Fprint(buf, "Redirected from %s to %s\n\n",
---
> fmt.Fprint(buf, fmt.Sprintf("Redirected from %s to %s\n\n",
141c141
< )
---
> ))
144c144
< fmt.Fprint(buf, "\nRead more: %s\n", page.URL)
---
> fmt.Fprint(buf, fmt.Sprintf("\nRead more: %s\n", page.URL))
When the
-n
flag is used, the output has errors (stray%s
format strings, coloured words repeated a few times, etc).As an example, running:
Results in the following output