{% import "git.gabrielgio.me/cerrado/pkg/u" %} {% import "github.com/go-git/go-git/v5/plumbing/object" %} {% import "github.com/go-git/go-git/v5/plumbing/filemode" %} {% code type GitItemTreePage struct { Path []string Tree *object.Tree } %} {% code const ( Folder = "tree" Blob = "blob" Root = "" ) %} {% code func url(name, mode, ref, filename string, path []string) string { return u.NewPathing(). AddPath(name). AddPath(mode). AddPath(ref). AddPaths(path). AddPath(filename). Done() } %} {% func (g *GitItemTreePage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %} {% func (g *GitItemTreePage) GitContent(name, ref string) %}