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
fmt.Fprintf(flag.CommandLine.Output(), "Usage of 'src orgs %s':\n", flagSet.Name())
28
-
flagSet.PrintDefaults()
29
-
fmt.Println(usage)
30
-
}
31
-
var (
32
-
nameFlag=flagSet.String("name", "", `Look up organization by name. (e.g. "abc-org")`)
33
-
formatFlag=flagSet.String("f", "{{.|json}}", `Format for the output, using the syntax of Go package text/template. (e.g. "{{.ID}}: {{.Name}} ({{.DisplayName}})")`)
34
-
apiFlags=api.NewFlags(flagSet)
35
-
)
36
-
37
-
handler:=func(args []string) error {
38
-
iferr:=flagSet.Parse(args); err!=nil {
39
-
returnerr
40
-
}
41
-
42
-
client:=cfg.apiClient(apiFlags, flagSet.Output())
43
-
44
-
tmpl, err:=parseTemplate(*formatFlag)
23
+
varorgsGetCommand=clicompat.Wrap(&cli.Command{
24
+
Name: "get",
25
+
Usage: "gets an organization",
26
+
UsageText: "src orgs get [options]",
27
+
Description: orgsGetExamples,
28
+
HideVersion: true,
29
+
Flags: clicompat.WithAPIFlags(
30
+
&cli.StringFlag{
31
+
Name: "name",
32
+
Usage: `Look up organization by name. (e.g. "abc-org")`,
33
+
},
34
+
&cli.StringFlag{
35
+
Name: "f",
36
+
Value: "{{.|json}}",
37
+
Usage: `Format for the output, using the syntax of Go package text/template. (e.g. "{{.ID}}: {{.Name}} ({{.DisplayName}})")`,
0 commit comments