Files
Davanum Srinivas 693dc57f57 Update go-openapi dependencies (jsonpointer, jsonreference, swag)
Bump go-openapi dependencies to latest versions:
- github.com/go-openapi/jsonpointer v0.21.0 → v0.22.4
- github.com/go-openapi/jsonreference v0.20.2 → v0.21.4
- github.com/go-openapi/swag v0.23.0 → v0.25.4

The new swag version has been restructured into a multi-module monorepo
with submodules (cmdutils, conv, fileutils, jsonname, jsonutils, loading,
mangling, netutils, stringutils, typeutils, yamlutils). As a result:
- mailru/easyjson and josharian/intern are no longer transitive deps
  and have been removed from vendor
- go-openapi/jsonpointer and go-openapi/swag no longer reference
  unwanted deps davecgh/go-spew, mailru/easyjson, or gopkg.in/yaml.v3
- Updated hack/unwanted-dependencies.json accordingly

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-04-24 08:13:31 -04:00

29 lines
761 B
Go

// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
// SPDX-License-Identifier: Apache-2.0
package conv
import (
"strconv"
)
// FormatInteger turns an integer type into a string.
func FormatInteger[T Signed](value T) string {
return strconv.FormatInt(int64(value), 10)
}
// FormatUinteger turns an unsigned integer type into a string.
func FormatUinteger[T Unsigned](value T) string {
return strconv.FormatUint(uint64(value), 10)
}
// FormatFloat turns a floating point numerical value into a string.
func FormatFloat[T Float](value T) string {
return strconv.FormatFloat(float64(value), 'f', -1, bitsize(value))
}
// FormatBool turns a boolean into a string.
func FormatBool(value bool) string {
return strconv.FormatBool(value)
}