Documentation ¶
Index ¶
- Variables
- func Gravatar(email string, size int) string
- func I18nDataFromINI(data []byte) (map[string]map[string]string, error)
- func I18nDataFromTOML(data []byte) (map[string]map[string]string, error)
- func LangCode(lang string) []string
- func LogfmtFormat() log15.Format
- func Markdown(raw []byte) []byte
- func Md5(str string) string
- func Md5File(file string) (string, error)
- type I18n
- type Pager
- type PagerCursor
- type PagerItem
- type Worker
- type WorkerFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrI18nUnknownExt = errors.New("unknown i18n ext")
)
Functions ¶
func I18nDataFromINI ¶
I18nDataFromINI parse ini data to map
func I18nDataFromTOML ¶
I18nDataFromTOML parse toml data to map
Types ¶
type I18n ¶
type I18n struct { Lang string // language string // contains filtered or unexported fields }
I18n object
func NewI18nEmpty ¶
func NewI18nEmpty() *I18n
NewI18nEmpty creates new empty i18n object, it will keep i18 tool working, but no translated value
type Pager ¶
type Pager struct { Begin int End int Prev int Next int Current int Pages int All int // contains filtered or unexported fields }
Pager contains pagination data when on a page number
type PagerCursor ¶
type PagerCursor struct {
// contains filtered or unexported fields
}
PagerCursor creates Pager with each page number
func NewPagerCursor ¶
func NewPagerCursor(size, all int) *PagerCursor
NewPagerCursor with size and all count
func (*PagerCursor) Page ¶
func (pg *PagerCursor) Page(i int) *Pager
Page creates Pager on a page number
Source Files ¶
Click to show internal directories.
Click to hide internal directories.