You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command migration is moving legacy commander commands onto urfave/cli so they share the same help, flag, and dispatch behavior as newly migrated commands.
Migrate src users and its list, get, create, delete, prune, and tag subcommands to cli.Command definitions. Register both users and user in the migrated command map, and remove users from the legacy docs path so generated docs come from the migrated root command.
Test Plan:
- go test ./cmd/src
- go test ./...
- go run ./cmd/src users -h
- go run ./cmd/src user -h
- go run ./cmd/src users list -h
fmt.Printf("No user ID specified. This would delete %d users.\nType in this number to confirm and hit return: ", result.Users.TotalCount)
61
+
if_, err:=fmt.Fprintf(cmd.Writer, "No user ID specified. This would delete %d users.\nType in this number to confirm and hit return: ", result.Users.TotalCount); err!=nil {
62
+
returnerr
63
+
}
65
64
reader:=bufio.NewReader(os.Stdin)
66
65
text, err:=reader.ReadString('\n')
67
66
iferr!=nil {
@@ -74,8 +73,8 @@ Examples:
74
73
}
75
74
76
75
ifcount!=result.Users.TotalCount {
77
-
fmt.Println("Number does not match. Aborting.")
78
-
returnnil
76
+
_, err:=fmt.Fprintln(cmd.Writer, "Number does not match. Aborting.")
0 commit comments