summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-03-26 00:09:21 +0530
committerAndinus <andinus@nand.sh>2020-03-26 00:09:21 +0530
commit448fb602b98fbe18f08bf4b95a3f97a45a652611 (patch)
tree85023b5612ed69839085c7aaf129da427bfa10f9
parentcf5f79c398801e7500ffd751ddbf10c919ab050b (diff)
downloadcetus-448fb602b98fbe18f08bf4b95a3f97a45a652611.tar.gz
Remove unnecessary comment
-rw-r--r--bpod/json.go9
1 files changed, 0 insertions, 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
 }