Documentation
¶
Index ¶
- func CleanPath(path string) string
- func Copy(ctx context.Context, dst io.Writer, src io.Reader, progress func(int64)) (int64, error)
- func CopyN(ctx context.Context, dst io.Writer, src io.Reader, n int64, ...) (int64, error)
- func CopyNWithContext(ctx context.Context, dst io.Writer, src io.Reader, n int64) (int64, error)
- func CopyWithContext(ctx context.Context, dst io.Writer, src io.Reader) (int64, error)
- func IsSubPath(path string, subPath string) bool
- func Pipe() (*reader, *writer)
- func PrettyByteSize(b int) string
- func Ptr[T any](x T) *T
- func StrReplace(s string, vars map[string]string) string
- func VerifyOption(value interface{}) error
- type Cache
- type DynamicModel
- type Filter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyNWithContext ¶
func CopyWithContext ¶
func PrettyByteSize ¶
func VerifyOption ¶
func VerifyOption(value interface{}) error
Types ¶
type Cache ¶
type Cache[K comparable, V any] interface { Load(K) (V, bool) Store(K, V) Delete(K) Reset() Range(func(K, V) bool) Len() int Iter() iter.Seq2[K, V] }
func NewCache ¶
func NewCache[K comparable, V any]() Cache[K, V]
type DynamicModel ¶
type DynamicModel[T any] struct { // contains filtered or unexported fields }
func NewDynamicModel ¶
func NewDynamicModel[T any](oldModel T, tagName string, replacer map[string]string) *DynamicModel[T]
func (*DynamicModel[T]) Model ¶
func (m *DynamicModel[T]) Model() T
func (*DynamicModel[T]) NewModel ¶
func (m *DynamicModel[T]) NewModel() any
Click to show internal directories.
Click to hide internal directories.