Unified · Split
| @@ -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 | break | 52 | 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 | ||