Skip to content

Commit

Permalink
refacto: switch case (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobg8 authored Nov 2, 2024
1 parent 053a818 commit f46d372
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/usecases/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,9 @@ func validateDateOperator(qualifier, value string) error {
func extractValue(value string) string {
var extractedValue string
switch {
case strings.HasPrefix(value, ">="):
case strings.HasPrefix(value, ">=") || strings.HasPrefix(value, "<="):
extractedValue = value[2:]
case strings.HasPrefix(value, "<="):
extractedValue = value[2:]
case strings.HasPrefix(value, ">"):
extractedValue = value[1:]
case strings.HasPrefix(value, "<"):
case strings.HasPrefix(value, ">") || strings.HasPrefix(value, "<"):
extractedValue = value[1:]
default:
extractedValue = value
Expand Down

0 comments on commit f46d372

Please sign in to comment.