Skip to content

Commit 02a0d6f

Browse files
authored
openapi3: simplify by replacing math.Min with min (#1032)
1 parent e230c13 commit 02a0d6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

openapi3/server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"errors"
77
"fmt"
8-
"math"
98
"net/url"
109
"sort"
1110
"strings"
@@ -174,7 +173,7 @@ func (server Server) MatchRawURL(input string) ([]string, string, bool) {
174173
} else if ns < 0 {
175174
i = np
176175
} else {
177-
i = int(math.Min(float64(np), float64(ns)))
176+
i = min(np, ns)
178177
}
179178
if i < 0 {
180179
i = len(input)

0 commit comments

Comments
 (0)