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
 }
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241