Skip to content

Commit c7f1bb9

Browse files
committed
fixup! refactor: rename package 'subcmd' to 'gateway'
1 parent 3cad317 commit c7f1bb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ func run(args []string) (int, string) {
7373
return result.Code, result.Msg
7474
}
7575

76-
func expandAlias(gateway string, args []string) (string, []string, error) {
76+
func expandAlias(subCmd string, args []string) (string, []string, error) {
7777
cfg, err := config.Read()
7878
if err != nil {
7979
return "", nil, errors.Wrap(err, "could not read config.toml")
8080
}
81-
if newArgs, exists := cfg.Alias[gateway]; exists && len(newArgs) > 0 {
82-
gateway = newArgs[0]
81+
if newArgs, exists := cfg.Alias[subCmd]; exists && len(newArgs) > 0 {
82+
subCmd = newArgs[0]
8383
args = append(newArgs[1:], args...)
8484
}
85-
return gateway, args, nil
85+
return subCmd, args, nil
8686
}
8787

8888
// On Windows, this function always returns nil.

0 commit comments

Comments
 (0)