Skip to content

Commit

Permalink
refactor(flags): rename addonName function to addonNameFromFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneM committed Nov 5, 2021
1 parent 8f6e55e commit 7352a9d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cmd/backups.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (
`,
Action: func(c *cli.Context) {
currentApp := appdetect.CurrentApp(c)
addonName := addonName(c)
addonName := addonNameFromFlags(c)
if addonName == "" {
fmt.Println("Unable to find the addon name, please use --addon flag.")
os.Exit(1)
Expand All @@ -47,7 +47,7 @@ var (
# See also 'backups' and 'addons'`,
Action: func(c *cli.Context) {
currentApp := appdetect.CurrentApp(c)
addonName := addonName(c)
addonName := addonNameFromFlags(c)
if addonName == "" {
fmt.Println("Unable to find the addon name, please use --addon flag.")
os.Exit(1)
Expand Down Expand Up @@ -80,7 +80,7 @@ var (
# See also 'backups' and 'addons'`,
Action: func(c *cli.Context) {
currentApp := appdetect.CurrentApp(c)
addonName := addonName(c)
addonName := addonNameFromFlags(c)
if addonName == "" {
fmt.Println("Unable to find the addon name, please use --addon flag.")
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Examples
`,
Action: func(c *cli.Context) {
currentApp := appdetect.CurrentApp(c)
addonName := addonName(c)
addonName := addonNameFromFlags(c)
if addonName == "" {
fmt.Println("Unable to find the addon name, please use --addon flag.")
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
}
)

func addonName(c *cli.Context) string {
func addonNameFromFlags(c *cli.Context) string {
var addonName string
if c.GlobalString("addon") != "<addon_id>" {
addonName = c.GlobalString("addon")
Expand Down
2 changes: 1 addition & 1 deletion cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
return
}

addonName := addonName(c)
addonName := addonNameFromFlags(c)

var err error
if addonName == "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/logs_archives.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
return
}

addonName := addonName(c)
addonName := addonNameFromFlags(c)

var err error
if addonName == "" {
Expand Down

0 comments on commit 7352a9d

Please sign in to comment.