History

Fprintf where it's not Fprintln

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 2ec98581 parent d132eca1 file · +4 −4Browse files

Unified · Split

main.go+4−4
@@ -34,13 +34,13 @@ func main() { · 33 unmodified lines
3434
3535 updatePeriod, err := time.ParseDuration(*period)
3636 if err != nil {
37− fmt.Fprintln(os.Stderr, "update period: %s", err)
37+ fmt.Fprintf(os.Stderr, "update period: %s", err)
3838 os.Exit(1)
3939 }
4040
4141 seenFile, err := os.OpenFile(*seenPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
4242 if err != nil {
43− fmt.Fprintln(os.Stderr, "seen file: %s", err)
43+ fmt.Fprintf(os.Stderr, "seen file: %s", err)
4444 os.Exit(1)
4545 }
4646 defer seenFile.Close()
@@ -51,7 +51,7 @@ func main() { · 4 unmodified lines
5151 if errors.Is(err, io.EOF) {
5252 break
5353 }
54− fmt.Fprintln(os.Stderr, "seen file: %s", err)
54+ fmt.Fprintf(os.Stderr, "seen file: %s", err)
5555 os.Exit(1)
5656 } else {
5757 url := []byte(strings.TrimSpace(url))
@@ -79,7 +79,7 @@ func main() { · 21 unmodified lines
7979 }
8080 })
8181 if err := c.ConnectTo(*server); err != nil {
82− fmt.Fprintln(os.Stderr, "irc: %s", err)
82+ fmt.Fprintf(os.Stderr, "irc: %s", err)
8383 os.Exit(1)
8484 }
8585

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t