From 448fb602b98fbe18f08bf4b95a3f97a45a652611 Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 26 Mar 2020 00:09:21 +0530 Subject: Remove unnecessary comment --- bpod/json.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/bpod/json.go b/bpod/json.go index 3c24bf7..a05c6fc 100644 --- a/bpod/json.go +++ b/bpod/json.go @@ -36,15 +36,6 @@ func UnmarshalJson(body string) (BPOD, error) { return res, fmt.Errorf("UnmarshalJson failed\n%s", err.Error()) } - // If random flag was not passed then list.Photos has only one - // entry and that will get selected because it's only one, in - // that case this rand.Intn wrap is stupid but when user - // passes the random flag then this wrap will return a single - // entry, which means we don't have to create another func to - // select random entry but this means that body and res are - // out of sync now, because res has only one entry but body - // still has all entries so we Marshal res into body with - // MarshalJson func. res = list.Photos[rand.Intn(len(list.Photos))] return res, nil } -- cgit 1.4.1-2-gfad0