Versions in this module Expand all Collapse all v1 v1.2.0 Dec 22, 2024 v1.1.0 Sep 22, 2024 v1.0.1 Jun 24, 2024 v1.0.0 May 18, 2024 Changes in this version + func CalculateMaxPageNum(size, step int) int + func FileServer(fsys fs.FS, stripPrefix string) http.HandlerFunc + func NewStaticFS(loc Location) fs.FS + func ServeSingle(fsys fs.FS, filePath string) http.HandlerFunc + type Location int + const Embed + const Filesystem + type Page struct + IsCurrent bool + func (p *Page) String() string + type PaginationResult struct + HasNext bool + HasPrev bool + Pages []*Page + Size int + Start int + Stop int + type Paginator struct + Pages [][]int + ShowEnd int + ShowNear int + ShowStart int + func NewPaginator(showNear, showStart, showEnd int) *Paginator + func (p *Paginator) AddPage(start, end int) *Paginator + func (p *Paginator) AddPages(size, step int) *Paginator + func (p *Paginator) Paginate(current int) []*Page + type PgInput struct + BaseUrl string + Current int + ExtraQargs template.URL + Max int + Step int + func NewPgInput(max, step, current int, baseUrl string, extraQargs url.Values) *PgInput + type TContainer struct + func ParseTemplates(loc Location) (*TContainer, error) + func (tc *TContainer) Get(name string) (TExecuter, error) + type TExecuter interface + Execute func(wr io.Writer, data any) error + ExecuteTemplate func(io.Writer, string, any) error + type TGetter interface + Get func(string) (TExecuter, error) + type TemplateMap map[string]TExecuter + func (tm *TemplateMap) Get(name string) (TExecuter, error)