Skip to content

Commit 54879fb

Browse files
committed
workflow instance id naming
1 parent 1c11dcd commit 54879fb

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

cmd/src/abc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ func init() {
1414
1515
Usage:
1616
17-
src abc <instance-id> command [command options]
17+
src abc <workflow-instance-id> command [command options]
1818
1919
The commands are:
2020
2121
variables manage workflow instance variables
2222
23-
Use "src abc <instance-id> [command] -h" for more information about a command.
23+
Use "src abc <workflow-instance-id> [command] -h" for more information about a command.
2424
`
2525

2626
flagSet := flag.NewFlagSet("abc", flag.ExitOnError)
@@ -40,11 +40,11 @@ Use "src abc <instance-id> [command] -h" for more information about a command.
4040
}
4141

4242
if flagSet.NArg() < 2 {
43-
return cmderrors.Usage("must provide an instance ID and subcommand")
43+
return cmderrors.Usage("must provide a workflow instance ID and subcommand")
4444
}
4545

4646
instanceID := flagSet.Arg(0)
47-
abcCommands.runWithPrefixArgs("src abc <instance-id>", []string{instanceID}, flagSet.Args()[1:])
47+
abcCommands.runWithPrefixArgs("src abc <workflow-instance-id>", []string{instanceID}, flagSet.Args()[1:])
4848
return nil
4949
}
5050

cmd/src/abc_variables.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ import (
1010
var abcVariablesCommands commander
1111

1212
func init() {
13-
usage := `'src abc <instance-id> variables' is a tool that manages workflow instance variables on a Sourcegraph instance.
13+
usage := `'src abc <workflow-instance-id> variables' is a tool that manages workflow instance variables on a Sourcegraph instance.
1414
1515
Usage:
1616
17-
src abc <instance-id> variables command [command options]
17+
src abc <workflow-instance-id> variables command [command options]
1818
1919
The commands are:
2020
2121
set set workflow instance variables
2222
delete delete a workflow instance variable
2323
24-
Use "src abc <instance-id> variables [command] -h" for more information about a command.
24+
Use "src abc <workflow-instance-id> variables [command] -h" for more information about a command.
2525
`
2626

2727
flagSet := flag.NewFlagSet("variables", flag.ExitOnError)
@@ -31,7 +31,7 @@ Use "src abc <instance-id> variables [command] -h" for more information about a
3131
flagSet.Usage = usageFunc
3232
handler := func(args []string) error {
3333
if len(args) == 0 {
34-
return cmderrors.Usage("must provide an instance ID")
34+
return cmderrors.Usage("must provide a workflow instance ID")
3535
}
3636

3737
instanceID := args[0]
@@ -45,7 +45,7 @@ Use "src abc <instance-id> variables [command] -h" for more information about a
4545
return nil
4646
}
4747

48-
abcVariablesCommands.runWithPrefixArgs("src abc <instance-id> variables", []string{instanceID}, flagSet.Args())
48+
abcVariablesCommands.runWithPrefixArgs("src abc <workflow-instance-id> variables", []string{instanceID}, flagSet.Args())
4949
return nil
5050
}
5151

cmd/src/abc_variables_delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ Examples:
2020

2121
flagSet := flag.NewFlagSet("delete", flag.ExitOnError)
2222
usageFunc := func() {
23-
fmt.Fprintf(flag.CommandLine.Output(), "Usage of 'src abc <instance-id> variables %s':\n", flagSet.Name())
23+
fmt.Fprintf(flag.CommandLine.Output(), "Usage of 'src abc <workflow-instance-id> variables %s':\n", flagSet.Name())
2424
flagSet.PrintDefaults()
2525
fmt.Println(usage)
2626
}
2727
apiFlags := api.NewFlags(flagSet)
2828

2929
handler := func(args []string) error {
3030
if len(args) == 0 {
31-
return cmderrors.Usage("must provide an instance ID")
31+
return cmderrors.Usage("must provide a workflow instance ID")
3232
}
3333

3434
instanceID := args[0]

cmd/src/abc_variables_set.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Values are interpreted as JSON literals when valid. Otherwise they are sent as p
4444
var variableArgs abcVariableArgs
4545
flagSet.Var(&variableArgs, "var", "Variable assignment in <name>=<value> form. Repeat to set multiple variables.")
4646
usageFunc := func() {
47-
fmt.Fprintf(flag.CommandLine.Output(), "Usage of 'src abc <instance-id> variables %s':\n", flagSet.Name())
47+
fmt.Fprintf(flag.CommandLine.Output(), "Usage of 'src abc <workflow-instance-id> variables %s':\n", flagSet.Name())
4848
flagSet.PrintDefaults()
4949
fmt.Println(usage)
5050
}
5151
apiFlags := api.NewFlags(flagSet)
5252

5353
handler := func(args []string) error {
5454
if len(args) == 0 {
55-
return cmderrors.Usage("must provide an instance ID")
55+
return cmderrors.Usage("must provide a workflow instance ID")
5656
}
5757

5858
instanceID := args[0]
@@ -145,7 +145,7 @@ func parseABCVariable(raw string) (abcVariable, error) {
145145
return abcVariable{}, err
146146
}
147147
if remove {
148-
return abcVariable{}, cmderrors.Usagef("invalid variable assignment %q: use 'src abc <instance-id> variables delete %s' to remove a variable", raw, name)
148+
return abcVariable{}, cmderrors.Usagef("invalid variable assignment %q: use 'src abc <workflow-instance-id> variables delete %s' to remove a variable", raw, name)
149149
}
150150

151151
return abcVariable{Key: name, Value: value}, nil

0 commit comments

Comments
 (0)