in internal/command/httpserver.go [20:35]
func newHTTPServerRunner(options *httpserver.Options, logger *zap.Logger) *cobra.Command {
r := &httpServerRunner{
opts: options,
cmd: &cobra.Command{
Use: "http-server [options]",
Short: "Set up a mock http server",
},
}
r.cmd.RunE = func(_ *cobra.Command, args []string) error {
r.logger = logger.Sugar().With("address", options.Addr)
return r.Run()
}
return r.cmd
}