x

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(file, contents string) error

func CreateFunc

func CreateFunc(path string, fn func() (string, error)) error

func Get

func Get(uri string) (io.ReadCloser, error)

func GetJSON

func GetJSON(uri string, data any) error

func GetWith added in v1.2.4

func GetWith(uri string, headers map[string]string) (io.ReadCloser, error)

func Logf added in v1.2.4

func Logf(format string, args ...interface{})

func MkdirAll

func MkdirAll(dir string) error

func NetCached added in v1.2.2

func NetCached(domain, id string, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)

func Online added in v1.2.2

func Online(domain string) bool

func PanicPrint added in v1.2.4

func PanicPrint(r any)

func Read added in v1.3.0

func Read(file string) string

func ReadCode

func ReadCode() (string, error)

func RecoverPanicPrint added in v1.2.4

func RecoverPanicPrint()

Types

type Cache

type Cache struct {
	Base string
	// contains filtered or unexported fields
}

func NewCache

func NewCache(name string) *Cache

func (*Cache) Cached

func (c *Cache) Cached(id string, expires time.Duration, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)

func (*Cache) Fork

func (c *Cache) Fork(name string) *Cache

func (*Cache) NetCached added in v1.2.2

func (c *Cache) NetCached(domain, id string, fn func() (io.ReadCloser, error)) (io.ReadCloser, error)

type FileCache added in v1.2.4

type FileCache struct {
	// contains filtered or unexported fields
}

func (*FileCache) Changed added in v1.2.4

func (c *FileCache) Changed(path string) bool

type RunFlags

type RunFlags struct {
	Open bool `opts:"help=open the problem page in your browser"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL