MCPcopy
hub / github.com/elastic/go-elasticsearch / WithStatusCode

Function WithStatusCode

_examples/interceptor/internal/fake/server.go:58–62  ·  view source on GitHub ↗

WithStatusCode sets the HTTP status code returned by the server.

(code int)

Source from the content-addressed store, hash-verified

56
57// WithStatusCode sets the HTTP status code returned by the server.
58func WithStatusCode(code int) Option {
59 return func(c *Config) {
60 c.StatusCode = code
61 }
62}
63
64// WithPort sets a specific port for the server to listen on.
65// Use 0 (default) for a random available port.

Callers 3

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected