File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
"log/slog"
6
6
"os"
7
7
"regexp"
8
+ "strconv"
8
9
9
10
"github.com/pb33f/libopenapi"
10
11
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
@@ -179,13 +180,13 @@ func interpolatePath(cmd *cobra.Command, h *HandlerData) error {
179
180
value , _ = flags .GetString (param .Name )
180
181
case Integer :
181
182
v , _ := flags .GetInt (param .Name )
182
- value = fmt . Sprintf ( "%d" , v )
183
+ value = strconv . FormatInt ( int64 ( v ), 10 )
183
184
case Number :
184
185
v , _ := flags .GetFloat64 (param .Name )
185
- value = fmt . Sprintf ( "%g" , v )
186
+ value = strconv . FormatFloat ( v , 'g' , - 1 , 64 )
186
187
case Boolean :
187
188
v , _ := flags .GetBool (param .Name )
188
- value = fmt . Sprintf ( "%t" , v )
189
+ value = strconv . FormatBool ( v )
189
190
}
190
191
191
192
h .Path = pattern .ReplaceAllString (h .Path , value )
You can’t perform that action at this time.
0 commit comments