MCPcopy Index your code
hub / github.com/git-bug/git-bug / newUserAdoptCommand

Function newUserAdoptCommand

commands/user/user_adopt.go:10–23  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

8)
9
10func newUserAdoptCommand(env *execenv.Env) *cobra.Command {
11 cmd := &cobra.Command{
12 Use: "adopt USER_ID",
13 Short: "Adopt an existing identity as your own",
14 Args: cobra.ExactArgs(1),
15 PreRunE: execenv.LoadBackend(env),
16 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
17 return runUserAdopt(env, args)
18 }),
19 ValidArgsFunction: completion.User(env),
20 }
21
22 return cmd
23}
24
25func runUserAdopt(env *execenv.Env, args []string) error {
26 prefix := args[0]

Callers 1

NewUserCommandFunction · 0.85

Calls 4

LoadBackendFunction · 0.92
CloseBackendFunction · 0.92
UserFunction · 0.92
runUserAdoptFunction · 0.85

Tested by

no test coverage detected