Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolden committed Aug 5, 2024
1 parent fdfe6eb commit 48d5826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/go/internal/cli/cmd/visit.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func getEpoch(timeStamp string) (int64, error) {

func checkArguments(vArgs visitArgs) (res OperationResult) {
if vArgs.slices > 0 || vArgs.sliceId > -1 {
if !(vArgs.slices > 0 && vArgs.sliceId > -1) {
if vArgs.slices <= 0 || vArgs.sliceId <= -1 {
return Failure("Both 'slices' and 'slice-id' must be set")
}
if vArgs.sliceId >= vArgs.slices {
Expand Down Expand Up @@ -308,7 +308,7 @@ func probeVisit(vArgs *visitArgs, service *vespa.Service) []string {

func runVisit(vArgs *visitArgs, service *vespa.Service) (res OperationResult) {
vArgs.debugPrint(fmt.Sprintf("trying to visit: '%s'", vArgs.contentCluster))
var totalDocuments int = 0
var totalDocuments = 0
var continuationToken string
for {
var vvo *VespaVisitOutput
Expand Down

0 comments on commit 48d5826

Please sign in to comment.