From cf5f79c398801e7500ffd751ddbf10c919ab050b Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 26 Mar 2020 00:02:56 +0530 Subject: Unmarshal after dump dump no longer exits the program, this doesn't make any different. We are still doing the same thing. --- cmd/cetus/bpod.go | 13 +++++-------- 1 file 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{} -- cgit 1.4.1-2-gfad0