Documentation ¶
Index ¶
- func GenerateTimeRanges(start, end time.Time, interval time.Duration) []time.Time
- func GetEnv(key string) (string, error)
- func Join[T any](vals []T, sep string, f func(T) string) string
- func NewInvalidAstError(msg string) error
- func NewUnsupportedError(msg string) error
- func NormalizeTimeByHour(t time.Time) time.Time
- func Ptr[T any](v T) *T
- func SliceOrEmpty[T any](vals []T) []T
- func Sort[T any, U constraints.Ordered](vals []T, f func(v T) U)
- func UniqBy[T any, U comparable](vals []T, fn func(T) U) []T
- type HttpTransport
- type InvalidAstError
- type LimitedHeap
- type Set
- type Stack
- type UnsupportedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTimeRanges ¶ added in v0.0.2
func NewInvalidAstError ¶
func NewUnsupportedError ¶
func SliceOrEmpty ¶
func SliceOrEmpty[T any](vals []T) []T
func Sort ¶
func Sort[T any, U constraints.Ordered](vals []T, f func(v T) U)
func UniqBy ¶
func UniqBy[T any, U comparable](vals []T, fn func(T) U) []T
Types ¶
type HttpTransport ¶
type HttpTransport struct {
Transport http.RoundTripper
}
func NewHttpTransport ¶
func NewHttpTransport() *HttpTransport
type InvalidAstError ¶
type InvalidAstError struct {
// contains filtered or unexported fields
}
func (*InvalidAstError) Error ¶
func (ie *InvalidAstError) Error() string
type LimitedHeap ¶ added in v0.0.2
type LimitedHeap[T any] struct { // contains filtered or unexported fields }
func NewLimitedHeap ¶ added in v0.0.2
func NewLimitedHeap[T any](limit int, less func(a, b T) bool) *LimitedHeap[T]
func (LimitedHeap[T]) Len ¶ added in v0.0.2
func (h LimitedHeap[T]) Len() int
func (LimitedHeap[T]) PopAll ¶ added in v0.0.2
func (h LimitedHeap[T]) PopAll() []T
func (LimitedHeap[T]) Push ¶ added in v0.0.2
func (h LimitedHeap[T]) Push(x T)
type Set ¶
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[T comparable]() *Set[T]
func NewSetS ¶
func NewSetS[T comparable](origins []T) *Set[T]
type UnsupportedError ¶
type UnsupportedError struct {
// contains filtered or unexported fields
}
func (*UnsupportedError) Error ¶
func (ue *UnsupportedError) Error() string
Click to show internal directories.
Click to hide internal directories.