Documentation ¶
Index ¶
- func Create(file, contents string) error
- func CreateFunc(path string, fn func() (string, error)) error
- func Get(uri string) (io.ReadCloser, error)
- func GetJSON(uri string, data any) error
- func GetWith(uri string, headers map[string]string) (io.ReadCloser, error)
- func Logf(format string, args ...interface{})
- func MkdirAll(dir string) error
- func NetCached(domain, id string, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)
- func Online(domain string) bool
- func PanicPrint(r any)
- func Read(file string) string
- func ReadCode() (string, error)
- func RecoverPanicPrint()
- type Cache
- type FileCache
- type RunFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NetCached ¶ added in v1.2.2
func NetCached(domain, id string, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)
func PanicPrint ¶ added in v1.2.4
func PanicPrint(r any)
func RecoverPanicPrint ¶ added in v1.2.4
func RecoverPanicPrint()
Types ¶
type Cache ¶
type Cache struct { Base string // contains filtered or unexported fields }
func (*Cache) Cached ¶
func (c *Cache) Cached(id string, expires time.Duration, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)
func (*Cache) NetCached ¶ added in v1.2.2
func (c *Cache) NetCached(domain, id string, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.