files

package
v0.0.0-...-cc8c95a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dir

type Dir struct {
	Name  string  `json:"name"`
	Path  string  `json:"path"`
	Files []*File `json:"files,omitempty"`
	Dirs  []*Dir  `json:"dirs,omitempty"`
}

func Scan

func Scan(root string, hidden bool) (*Dir, error)

func (*Dir) Find

func (d *Dir) Find(suffix string) []*File

func (*Dir) Match

func (d *Dir) Match(url []string, index string) *File

type Document

type Document struct {
	Meta *Meta  `json:"meta"`
	Body string `json:"body"`
}

type File

type File struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

func (*File) Document

func (f *File) Document() (*Document, error)

func (*File) Load

func (f *File) Load() ([]byte, error)

type Meta

type Meta struct {
	Title string `yaml:"title" json:"title"`
	Slug  string `yaml:"slug" json:"slug"`
}

Jump to

Keyboard shortcuts

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