Compare commits
2 commits
e95f47874a
...
07daead293
Author | SHA1 | Date | |
---|---|---|---|
![]() |
07daead293 | ||
![]() |
0f18a44eb8 |
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
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
rng := rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
http.HandleFunc("/randomnumber", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "%d", rand.Intn(1000))
|
||||
fmt.Fprintf(w, "%d", rng.Intn(1000))
|
||||
})
|
||||
|
||||
http.HandleFunc("/slowtest", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Add table
Reference in a new issue