MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / main

Function main

examples/streaming/stdhttp/main.go:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func main() {
14 port := flag.String("port", "8080", "port to serve on")
15 flag.Parse()
16
17 server := sse.NewServer(*port)
18 ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
19 defer cancel()
20 err := server.Run(ctx)
21 if err != nil {
22 slog.Error("server run failed", "error", err)
23 os.Exit(1)
24 }
25}

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
NewServerFunction · 0.92
StringMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected