Skip to content

Commit

Permalink
enhance: gofmt for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceJJones committed Sep 21, 2024
1 parent e7579f5 commit 007d1c7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions pkg/formatters/formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ func F5(w http.ResponseWriter, r *http.Request) {
}

func Juniper(w http.ResponseWriter, r *http.Request) {
decisions := r.Context().Value(registry.GlobalDecisionRegistry.Key).([]*models.Decision)
for _, decision := range decisions {
switch strings.ToLower(*decision.Scope) {
case "ip":
mask := "/32"
if strings.Contains(*decision.Value, ":") {
mask = "/128"
}
fmt.Fprintf(w, "%s%s\n", *decision.Value, mask)
case "range":
fmt.Fprintf(w, "%s\n", *decision.Value)
default:
}
}
decisions := r.Context().Value(registry.GlobalDecisionRegistry.Key).([]*models.Decision)
for _, decision := range decisions {
switch strings.ToLower(*decision.Scope) {
case "ip":
mask := "/32"
if strings.Contains(*decision.Value, ":") {
mask = "/128"
}
fmt.Fprintf(w, "%s%s\n", *decision.Value, mask)
case "range":
fmt.Fprintf(w, "%s\n", *decision.Value)
default:
}
}
}

0 comments on commit 007d1c7

Please sign in to comment.