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

Function NewServer

examples/streaming/stdhttp/sse/impl.go:18–27  ·  view source on GitHub ↗
(port string)

Source from the content-addressed store, hash-verified

16}
17
18func NewServer(port string) *Server {
19 s := &Server{}
20 strictHandler := NewStrictHandler(s, nil)
21 handler := Handler(strictHandler)
22 s.httpServer = &http.Server{
23 Handler: handler,
24 Addr: ":" + port,
25 }
26 return s
27}
28func (s Server) Run(ctx context.Context) error {
29 go func() {
30 <-ctx.Done()

Callers 1

mainFunction · 0.92

Calls 2

NewStrictHandlerFunction · 0.70
HandlerFunction · 0.70

Tested by

no test coverage detected