Skip to content

Commit 9657c83

Browse files
authored
Fix lint issues (#13)
1 parent e2d5ee6 commit 9657c83

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

cmd/root.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ var rootCmd = &cobra.Command{
1616
Use: "aws-cli-manager",
1717
Short: "AWS CLI Manager is a tool to manage AWS CLI profiles",
1818
Run: func(cmd *cobra.Command, args []string) {
19-
// SelectProfile now returns a boolean indicating whether a profile was selected
20-
// We don't need to do anything with the return value here
2119
profile.SelectProfile()
2220
},
2321
}

cmd/select.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ var selectCmd = &cobra.Command{
1313
Run: func(cmd *cobra.Command, args []string) {
1414
if len(args) == 0 {
1515
// If no profile is specified, show the selection menu
16-
// SelectProfile now returns a boolean indicating whether a profile was selected
17-
selected := profile.SelectProfile()
18-
if !selected {
19-
// User cancelled the selection with Ctrl+C
20-
return
21-
}
16+
// SelectProfile returns false if user cancels with Ctrl+C
17+
profile.SelectProfile()
2218
} else {
2319
// If a profile is specified, select it directly
2420
profileName := args[0]

pkg/aws/aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func ListProfiles() {
2121

2222
// Fill the table with the profiles
2323
for awsProfile, details := range awsProfiles.Profiles {
24-
ssoStatus := "No"
24+
var ssoStatus string
2525
if details.SSOEnabled {
2626
ssoStatus = color.GreenString("Yes")
2727
} else {

pkg/installer/validator.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,14 @@ func installAWSCLI() {
227227

228228
osSystem := detectOS()
229229

230-
if osSystem == "darwin" {
230+
switch osSystem {
231+
case "darwin":
231232
installAWSCLIMac()
232-
} else if osSystem == "linux" {
233+
case "linux":
233234
installAWSCLILinux()
234-
} else if osSystem == "windows" {
235+
case "windows":
235236
installAWSCLIWindows()
236-
} else {
237+
default:
237238
message := fmt.Errorf("unsupported OS detected, please use MacOS, Linux or Windows")
238239
log.Fatalf("%v", message)
239240
}

0 commit comments

Comments
 (0)