MCPcopy Create free account
hub / github.com/screego/server / fakeShutdownError

Function fakeShutdownError

server/server_test.go:86–94  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

84}
85
86func fakeShutdownError(err error) func() {
87 old := serverShutdown
88 serverShutdown = func(server *http.Server, ctx context.Context) error {
89 return err
90 }
91 return func() {
92 serverShutdown = old
93 }
94}
95
96func port() int {
97 addr, err := net.ResolveTCPAddr("tcp", "localhost:0")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected