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
34 34
35 updatePeriod, err := time.ParseDuration(*period)35 updatePeriod, err := time.ParseDuration(*period)
36 if err != nil {36 if err != nil {
37 fmt.Fprintln(os.Stderr, "update period: %s", err)37 fmt.Fprintf(os.Stderr, "update period: %s", err)
38 os.Exit(1)38 os.Exit(1)
39 }39 }
40 40
41 seenFile, err := os.OpenFile(*seenPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)41 seenFile, err := os.OpenFile(*seenPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
42 if err != nil {42 if err != nil {
43 fmt.Fprintln(os.Stderr, "seen file: %s", err)43 fmt.Fprintf(os.Stderr, "seen file: %s", err)
44 os.Exit(1)44 os.Exit(1)
45 }45 }
46 defer seenFile.Close()46 defer seenFile.Close()
@@ -51,7 +51,7 @@ func main() { · 4 unmodified lines
51 if errors.Is(err, io.EOF) {51 if errors.Is(err, io.EOF) {
52 break52 break
53 }53 }
54 fmt.Fprintln(os.Stderr, "seen file: %s", err)54 fmt.Fprintf(os.Stderr, "seen file: %s", err)
55 os.Exit(1)55 os.Exit(1)
56 } else {56 } else {
57 url := []byte(strings.TrimSpace(url))57 url := []byte(strings.TrimSpace(url))
@@ -79,7 +79,7 @@ func main() { · 21 unmodified lines
79 }79 }
80 })80 })
81 if err := c.ConnectTo(*server); err != nil {81 if err := c.ConnectTo(*server); err != nil {
82 fmt.Fprintln(os.Stderr, "irc: %s", err)82 fmt.Fprintf(os.Stderr, "irc: %s", err)
83 os.Exit(1)83 os.Exit(1)
84 }84 }
85 85

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