summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-04-17 20:45:40 +0300
committerPaul Buetow <paul@buetow.org>2023-04-17 20:45:40 +0300
commit41a913d59e4f14b6cc61cb5eabaf0adda5c4b809 (patch)
tree1b9448251d5a0dd57730da56ee1f5a641889d06f
parent3ff14aa0c47994c6e09a1f11916ba13e7f8b3f9c (diff)
fix
-rw-r--r--state.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/state.go b/state.go
index 67cb1d4..58c209f 100644
--- a/state.go
+++ b/state.go
@@ -18,7 +18,8 @@ func newState(config config) (state, error) {
state := state{stateFile, make(map[string]int)}
if _, err := os.Stat(stateFile); err != nil {
- return state, err
+ // OK, may be first run with no state yet.
+ return state, nil
}
file, err := os.Open(stateFile)