Compare commits
No commits in common. "07daead293f1912757b1f7b34dc3a1a3457fe12a" and "e95f47874a86581051762f975b1507cda9091877" have entirely different histories.
07daead293
...
e95f47874a
1 changed files with 197 additions and 197 deletions
4
main.go
4
main.go
|
@ -61,9 +61,9 @@ func main() {
|
|||
defer db.Close()
|
||||
|
||||
// Your actual API
|
||||
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
http.HandleFunc("/randomnumber", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "%d", rng.Intn(1000))
|
||||
fmt.Fprintf(w, "%d", rand.Intn(1000))
|
||||
})
|
||||
|
||||
http.HandleFunc("/slowtest", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Add table
Reference in a new issue