/
githubmirror
/
kubernetes
Обзор
Документация
Войти
/
githubmirror
/
kubernetes
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
vendor/github.com/go-openapi/swag/conv/format.go
28 строк
761 B
Davanum Srinivas
Update go-openapi dependencies (jsonpointer, jsonreference, swag)
24 апр 2026, 15:13
Не верифицирован
24 апр 2026, 15:13
693dc57
Код
Авторство
О чём код?
// 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) }