Documentation ¶
Index ¶
- func CopyFilesAll(thisDir, toDir string)
- func CreateFileWithContent(content string, name ...string)
- func IsExist(filename string) bool
- func IsNotIn[T string | int | float32 | float64](arr []T, target T) bool
- func MakeTemplateFile(dir, name, tmpl string)
- func RenderHandle(filename string) func(w http.ResponseWriter, r *http.Request)
- func ReturnCategoryList(posts *[]model.Post) []string
- func SimpleMkdir(em ...string)
- func TrimExt(filename string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileWithContent ¶ added in v1.1.0
func MakeTemplateFile ¶ added in v1.1.0
func MakeTemplateFile(dir, name, tmpl string)
创建基础模板文件,分别传入模板名称(可自定义)。 其中dir有三个个可选值,分别是“posts”和“pages”以及“common”,对应文章、页面模板以及共用的模板
func RenderHandle ¶ added in v1.1.0
func RenderHandle(filename string) func(w http.ResponseWriter, r *http.Request)
func ReturnCategoryList ¶ added in v1.1.0
func SimpleMkdir ¶ added in v1.1.0
func SimpleMkdir(em ...string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.