Compare commits

..

2 commits

Author SHA1 Message Date
Lucas
07daead293 Replace deprecated rand.Seed with rand.New
Updates random number generation to use the modern approach with
rand.New(rand.NewSource()) instead of the deprecated rand.Seed().

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 02:31:35 +02:00
Lucas
0f18a44eb8 Format Go code with gofmt
Standardizes indentation from spaces to Go's canonical tab formatting.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-14 02:31:17 +02:00

View file

@ -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) {