diff options
author | Andinus <andinus@nand.sh> | 2020-03-26 00:02:56 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-03-26 00:02:56 +0530 |
commit | cf5f79c398801e7500ffd751ddbf10c919ab050b (patch) | |
tree | ec0c563e6db2e59e02c5d420e66f03f55456efa6 | |
parent | 9173bb62242800b3fe14f888d25ad5d0cc75cbd8 (diff) | |
download | cetus-cf5f79c398801e7500ffd751ddbf10c919ab050b.tar.gz |
Unmarshal after dump
dump no longer exits the program, this doesn't make any different. We are still doing the same thing.
-rw-r--r-- | cmd/cetus/bpod.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/cmd/cetus/bpod.go b/cmd/cetus/bpod.go index 160f9ae..39f6d0b 100644 --- a/cmd/cetus/bpod.go +++ b/cmd/cetus/bpod.go @@ -88,10 +88,11 @@ func execBPOD() { } } - // Unmarshal before dump because otherwise if we come across - // the date for the first time then it would just dump and - // exit without saving it to cache. This way we first save it - // to cache if *bpodRand is true. + + if dump { + fmt.Println(body) + } + res, err := bpod.UnmarshalJson(body) if err != nil { log.Fatal(err) @@ -107,10 +108,6 @@ func execBPOD() { file = fmt.Sprintf("%s/%s.json", cacheDir, res.StartDate) - if dump { - fmt.Println(body) - } - // Send a desktop notification if notify flag was passed. if notify { n := notification.Notif{} |