Documentation
¶
Index ¶
- func As[T any](v any) (out T, ok bool)
- func Atoi[I SubInt64](i I) string
- func Cast[T any](v any) (out T)
- func FormatFloat[F constraints.Float](f F) string
- func NewListValue(items ...any) *structpb.ListValue
- func NewValue(a any) *structpb.Value
- func ParseFloat[F constraints.Float](s string) (F, error)
- type Provider
- type SubInt64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFloat ¶
func FormatFloat[F constraints.Float](f F) string
func NewListValue ¶
func ParseFloat ¶
func ParseFloat[F constraints.Float](s string) (F, error)
Types ¶
type Provider ¶
type Provider[T any] func() T
Provider is a singleton wrapper that is only instantiated once. It's the same as sync.OnceValue but without the additional overhead of supporting concurrent calls.
func NewProvider ¶
NewProvider constructs a new Provider.
Click to show internal directories.
Click to hide internal directories.