(err string)
| 269 | return fn(c, svc) |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | // nameCommand builds a subcommand that takes a --name flag and runs fn. |
| 274 | func nameCommand(name, usage string, ctx context.Context, root string, stderr io.Writer, stdout io.Writer, fn func(context.Context, *daemon.Service, string, io.Writer) error) ucli.Command { |
| 275 | return ucli.Command{ |
| 276 | Name: name, |
| 277 | Usage: usage, |
| 278 | Flags: []ucli.Flag{ucli.StringFlag{Name: "name", Usage: "repo name (required)"}}, |
| 279 | Action: withService(ctx, root, stderr, func(c *ucli.Context, svc *daemon.Service) error { |
no test coverage detected