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 55 "log/slog"
66 "os"
77 "regexp"
8+ "strconv"
89
910 "github.com/pb33f/libopenapi"
1011 v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
@@ -179,13 +180,13 @@ func interpolatePath(cmd *cobra.Command, h *HandlerData) error {
179180 value , _ = flags .GetString (param .Name )
180181 case Integer :
181182 v , _ := flags .GetInt (param .Name )
182- value = fmt . Sprintf ( "%d" , v )
183+ value = strconv . FormatInt ( int64 ( v ), 10 )
183184 case Number :
184185 v , _ := flags .GetFloat64 (param .Name )
185- value = fmt . Sprintf ( "%g" , v )
186+ value = strconv . FormatFloat ( v , 'g' , - 1 , 64 )
186187 case Boolean :
187188 v , _ := flags .GetBool (param .Name )
188- value = fmt . Sprintf ( "%t" , v )
189+ value = strconv . FormatBool ( v )
189190 }
190191
191192 h .Path = pattern .ReplaceAllString (h .Path , value )
You can’t perform that action at this time.
0 commit comments