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...).
Type conversion
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{})
Using pointers
The conv subpackage provides helpers to convert the types to and from pointers, just like go-openapi/swag does
with primitive types.
Format types
Types defined in strfmt expose marshaling and validation capabilities.
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.
Git dependencies in open source packages can introduce significant risks, including lack of version control, stability issues, dependency drift, and difficulty in auditing, making them potential targets for supply chain attacks.
Check out what's new at Socket with our Product Changelog. It tracks all public-facing updates, improvements, and fixes so you can take full advantage of our features.