Skip to content

Commit

Permalink
rand
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gubanov committed Jun 25, 2016
1 parent f0c90c4 commit 6a13539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Expand Up @@ -48,8 +48,8 @@ func LocationHandler(w http.ResponseWriter, req *http.Request) {
if rand.Intn(2) == 0 { // 0 or 1
var o Object
o.Lat, o.Lon, o.Title = point.Lat, point.Lon, fmt.Sprintf("Some object #%d", rand.Int())
o.Lat += rand.Float64() / 500
o.Lon += rand.Float64() / 500
o.Lat += rand.Float64() / 500 - 0.5
o.Lon += rand.Float64() / 500 - 0.5

w.Header().Set(contentType, contentTypeValue)
body, err = json.Marshal(o)
Expand Down

0 comments on commit 6a13539

Please sign in to comment.