Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/go-openapi/strfmt
This package exposes a registry of data types to support string formats in the go-openapi toolkit.
strfmt represents a well known string format such as credit card or email. The go toolkit for OpenAPI specifications knows how to deal with those.
go-openapi/strfmt follows the swagger 2.0 specification with the following formats defined here.
It also provides convenient extensions to go-openapi users.
NOTE: as the name stands for, this package is intended to support string formatting only. It does not provide validation for numerical values with swagger format extension for JSON types "number" or "integer" (e.g. float, double, int32...).
All types defined here are stringers and may be converted to strings with .String()
.
Note that most types defined by this package may be converted directly to string like string(Email{})
.
Date
and DateTime
may be converted directly to time.Time
like time.Time(Time{})
.
Similarly, you can convert Duration
to time.Duration
as in time.Duration(Duration{})
The conv
subpackage provides helpers to convert the types to and from pointers, just like go-openapi/swag
does
with primitive types.
Types defined in strfmt expose marshaling and validation capabilities.
List of defined types:
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.