Code QuizIntermediate

Basic slog Logger with JSON Handler

Spot the mistake when building a basic slog logger with a JSON handler.

Codego
package main

import (
	"log/slog"
	"os"
)

func main() {
	logger := slog.New(slog.NewJSONHandler(os.Stdout))
	logger.Info("service started", "port", 8080)
}

What is the bug in this code that prevents it from compiling?