Documentation
¶
Index ¶
- Constants
- func EncodeURIComponent(str string) string
- func EnsureDirOf(path string) error
- func ExpandUserPath(path string) string
- func Filter[T any](items []T, filtfunc func(T) bool) (out []T)
- func FormatDate(t time.Time) string
- func FormatTime(t time.Time) string
- func IsDirEmpty(name string) (bool, error)
- func JsonDecodeBytes(bytes []byte) (interface{}, error)
- func JsonDecodeStr(str string) (interface{}, error)
- func JsonGet(url string, onReq func(req *http.Request)) (interface{}, *http.Response, error)
- func JsonReadFile(path string) (interface{}, error)
- func JsonToQueryString(json StringMap) string
- func JsonWriteFile(data interface{}, path string, perm os.FileMode) error
- func Map[T any, U any](items []T, mapfunc func(T) U) (out []U)
- func NeedsRefresh(refresh_type int32, last_refreshed_at time.Time, now time.Time) bool
- func OpenBrowser(url string)
- func ParseDate(str string) time.Time
- func ParseTime(str string) time.Time
- func PriceString(value float64) string
- type DefaultMap
- type StringMap
Constants ¶
View Source
const ( DATE_FORMAT = "2006-01-02" DATETIME_FORMAT = "2006-01-02 03-04-05" )
Variables ¶
This section is empty.
Functions ¶
func EncodeURIComponent ¶ added in v0.0.14
func EnsureDirOf ¶
func ExpandUserPath ¶
func FormatDate ¶
func FormatTime ¶
func IsDirEmpty ¶
func JsonDecodeBytes ¶
func JsonDecodeStr ¶
func JsonReadFile ¶ added in v0.0.24
func JsonToQueryString ¶
func JsonWriteFile ¶ added in v0.0.24
func NeedsRefresh ¶
func OpenBrowser ¶ added in v0.0.4
func OpenBrowser(url string)
*
- Opens the browser pointing to a given URL.
func PriceString ¶
Types ¶
type DefaultMap ¶ added in v0.0.18
type DefaultMap[V interface{}] struct {
// contains filtered or unexported fields
}
func NewDefaultMap ¶ added in v0.0.18
func NewDefaultMap[V any](creator func(key string) V) *DefaultMap[V]
func (*DefaultMap[V]) Ensure ¶ added in v0.0.18
func (tm *DefaultMap[V]) Ensure(key string) V
func (*DefaultMap[V]) Get ¶ added in v0.0.18
func (tm *DefaultMap[V]) Get(key string) (V, bool)
Click to show internal directories.
Click to hide internal directories.