Skip to content

Commit dae7a1a

Browse files
committed
fix: fix old codes for single mode :sadcat:
1 parent cf965e1 commit dae7a1a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/json"
66
"flag"
77
"fmt"
8+
89
"log"
910
"time"
1011

@@ -65,6 +66,7 @@ func main() {
6566
snapshots, err := getSnapshots(client, url)
6667
if err != nil {
6768
log.Printf("failed to snapshots: %s\n", err)
69+
continue
6870
}
6971

7072
if *flagSnapshots {
@@ -76,7 +78,7 @@ func main() {
7678
}
7779
fmt.Printf("* %s | %s | %s\n", s[0], parsedTime.Format(viewTimeLayout), s[1])
7880
}
79-
os.Exit(0)
81+
continue
8082
}
8183

8284
selectedSnapshot := snapshots[len(snapshots)-1]
@@ -93,7 +95,7 @@ func main() {
9395
for _, s := range snapshots {
9496
snapshotContent, err := getSnapshotContent(client, s[0], s[1])
9597
if err != nil {
96-
log.Fatalf("failed to read input: %s\n", err)
98+
log.Printf("failed to read input: %s\n", err)
9799
}
98100

99101
io.Copy(os.Stdout, snapshotContent)
@@ -103,7 +105,8 @@ func main() {
103105

104106
snapshotContent, err := getSnapshotContent(client, selectedSnapshot[0], selectedSnapshot[1])
105107
if err != nil {
106-
log.Fatalf("failed to read input: %s\n", err)
108+
log.Printf("failed to read input: %s\n", err)
109+
continue
107110
}
108111

109112
io.Copy(os.Stdout, snapshotContent)

0 commit comments

Comments
 (0)