Documentation ¶
Overview ¶
Package setu 统一图床
Index ¶
Constants ¶
View Source
const DefaultPoolDir = "data/setupool"
DefaultPoolDir ...
Variables ¶
View Source
var ( // ErrNilFolder ... ErrNilFolder = errors.New("nil folder") // ErrNoSuchType ... ErrNoSuchType = errors.New("no such type") // ErrEmptyType ... ErrEmptyType = errors.New("empty type") )
View Source
var DefaultPool = func() *Pool { p, err := NewPool(DefaultPoolDir, func(s string) (string, error) { typ := DefaultPoolDir + "/" + s if file.IsNotExist(typ) { err := os.MkdirAll(typ, 0755) if err != nil { return "", err } } return "https://img.moehu.org/pic.php?id=pc", nil }, web.GetData, time.Minute) if err != nil { panic(err) } return p }()
DefaultPool ...
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.