Skip to content

Commit

Permalink
chore: replace if conditions with switch
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Kolberg <[email protected]>
  • Loading branch information
amdprophet committed Jul 5, 2023
1 parent 15bd7ba commit 9b7d16e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/scripts_test/check_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ func checkConfigFilesOwnershipAndPermissions(ownerName string, ownerGroup string
permissions = configPathDirPermissions
}
} else {
if path == configPath {
switch path {
case configPath:
// /etc/otelcol-sumo/sumologic.yaml
permissions = configPathFilePermissions
} else if path == userConfigPath {
case userConfigPath:
// /etc/otelcol-sumo/conf.d/common.yaml
permissions = commonConfigPathFilePermissions
} else {
default:
// /etc/otelcol-sumo/conf.d/*
permissions = confDPathFilePermissions
}
Expand Down

0 comments on commit 9b7d16e

Please sign in to comment.