WithStatusCode sets the HTTP status code returned by the server.
(code int)
| 56 | |
| 57 | // WithStatusCode sets the HTTP status code returned by the server. |
| 58 | func 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. |