MCPcopy
hub / github.com/basecamp/once / run

Method run

internal/command/stop.go:29–41  ·  view source on GitHub ↗

Private

(ctx context.Context, ns *docker.Namespace, cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

27// Private
28
29func (s *stopCommand) run(ctx context.Context, ns *docker.Namespace, cmd *cobra.Command, args []string) error {
30 host := args[0]
31
32 err := withApplication(ns, host, "stopping", func(app *docker.Application) error {
33 return app.Stop(ctx)
34 })
35 if err != nil {
36 return err
37 }
38
39 fmt.Printf("Stopped %s\n", host)
40 return nil
41}

Callers

nothing calls this directly

Calls 2

withApplicationFunction · 0.85
StopMethod · 0.45

Tested by

no test coverage detected