Skip to content

Commit

Permalink
simplify arg length checks
Browse files Browse the repository at this point in the history
  • Loading branch information
consolethinks committed Jul 12, 2024
1 parent d5494a7 commit 44a881d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/commands/datasetCleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For further help see "` + MANUAL + `"`,
log.Printf("You are about to remove a dataset from the === %s === data catalog environment...", env)
color.Unset()

if len(args) < 1 || len(args) > 1 {
if len(args) != 1 {
log.Println("invalid number of args")
return
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/datasetGetProposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ For further help see "` + MANUAL + `"`,
color.Unset()

//TODO cleanup text formatting:
if len(args) < 1 || len(args) > 1 {
if len(args) != 1 {
log.Fatalln("invalid number of args")
}
ownerGroup := args[0]
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/datasetRetriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ For further help see "` + MANUAL + `"`,

destinationPath := ""

if len(args) < 1 || len(args) > 1 {
if len(args) != 1 {
log.Fatalln("invalid number of args")
}
destinationPath = args[0]
Expand Down

0 comments on commit 44a881d

Please sign in to comment.