@@ -22,37 +22,34 @@ type ConfigureCmd struct {
2222 Add ConfigureAddCmd `cmd:"" optional:"" help:"Add configuration for a new organization"`
2323}
2424
25- type ConfigureDefaultCmd struct {
26- }
25+ type ConfigureDefaultCmd struct {}
2726
28- type ConfigureAddCmd struct {
29- }
27+ type ConfigureAddCmd struct {}
3028
3129func (c * ConfigureAddCmd ) Help () string {
32- return `
30+ return `
3331Examples:
34- # Prompt configuration to add for a new organization
32+ # Interactively configure a new organization
3533 $ bk configure add
3634
37- # Add configure Buildkite API token
38- $ bk configure add --org my-org --token my-token
35+ # Configure a new organization non-interactively
36+ $ bk configure add --org my-org --token my-token
3937`
4038}
4139
4240func (c * ConfigureCmd ) Help () string {
43- return `
41+ return `
4442Examples:
4543 # Configure Buildkite API token
4644 $ bk configure --org my-org --token my-token
4745
4846 # Force setting a new token
49- $ bk configure --force --org my-org --token my-token
47+ $ bk configure --force --org my-org --token my-token
5048`
5149}
5250
5351func (c * ConfigureCmd ) Run (kongCtx * kong.Context , globals cli.GlobalFlags ) error {
5452 f , err := factory .New ()
55-
5653 if err != nil {
5754 return err
5855 }
@@ -69,7 +66,6 @@ func (c *ConfigureCmd) Run(kongCtx *kong.Context, globals cli.GlobalFlags) error
6966 if ! c .Force && f .Config .APIToken () != "" {
7067 return errors .New ("API token already configured. You must use --force" )
7168 }
72-
7369 }
7470
7571 // If flags are provided, use them directly
@@ -96,7 +92,6 @@ func ConfigureRun(f *factory.Factory, org string) error {
9692 if org == "" {
9793 // Get organization slug
9894 inputOrg , err := promptForInput ("Organization slug: " , false )
99-
10095 if err != nil {
10196 return err
10297 }
0 commit comments