Pi66

Home | Repos | About | Blog | Gaza

merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi

About | Files | Commits | Refs | License


fix: apply gofmt cleanup

Author: pi66
Date: 2026-09-25 10:32
commit: 87cb10a1

Stat

D src/config/main.go 1 +0 -1
D src/core/build/compile/document.go 1 +0 -1
M src/core/build/compile/markdown/main.go 5 +2 -3
M src/core/build/main.go 5 +3 -2
M src/core/lua/build.go 6 +3 -3

Diff

diff --git a/src/config/main.go b/src/config/main.go
index f8e5cca..0d7a403 100644
--- a/src/config/main.go
+++ b/src/config/main.go
@@ -31,7 +31,6 @@ type Tree struct {
 	ReleaseDest string `toml:"release_dest"`
 }

- type Data struct { Project Project `toml:"project"` Tree Tree `toml:"tree"` diff --git a/src/core/build/compile/document.go b/src/core/build/compile/document.go index 5c970bc..09ff1fd 100644 --- a/src/core/build/compile/document.go +++ b/src/core/build/compile/document.go @@ -39,7 +39,6 @@ func (self *Compile) WriteDoc(docContent string, docPath string) error { return os.WriteFile(docPath, []byte(docContent), 0o644) }

...
Show all
diff --git a/src/config/main.go b/src/config/main.go
index f8e5cca..0d7a403 100644
--- a/src/config/main.go
+++ b/src/config/main.go
@@ -31,7 +31,6 @@ type Tree struct {
 	ReleaseDest string `toml:"release_dest"`
 }

- type Data struct { Project Project `toml:"project"` Tree Tree `toml:"tree"` diff --git a/src/core/build/compile/document.go b/src/core/build/compile/document.go index 5c970bc..09ff1fd 100644 --- a/src/core/build/compile/document.go +++ b/src/core/build/compile/document.go @@ -39,7 +39,6 @@ func (self *Compile) WriteDoc(docContent string, docPath string) error { return os.WriteFile(docPath, []byte(docContent), 0o644) }

- func (self *Compile) ResolveDocPaths(mdFile string) (mdPath, docPath string, err error) { mdPath = filepath.Join(self.State.ProjectDir, mdFile) docPath, err = self.docDestPath(mdPath) diff --git a/src/core/build/compile/markdown/main.go b/src/core/build/compile/markdown/main.go index 01fdb2c..b8567e2 100644 --- a/src/core/build/compile/markdown/main.go +++ b/src/core/build/compile/markdown/main.go @@ -18,8 +18,8 @@ import ( type Markdown struct { Extensions []goldmark.Extender ParsersOption []parser.Option - Build L.Build - Page *jinja.Page + Build L.Build + Page *jinja.Page }

func (self *Markdown) Init(state *State) { @@ -27,7 +27,6 @@ func (self *Markdown) Init(state *State) { self.ParsersOption = state.Lua.ParsersOption }

- func (self *Markdown) ReadMD(mdfile string) (string, error) { content, err := os.ReadFile(mdfile) return string(content), err diff --git a/src/core/build/main.go b/src/core/build/main.go index 9ef4abc..28cffe2 100644 --- a/src/core/build/main.go +++ b/src/core/build/main.go @@ -37,12 +37,13 @@ func (self *Build) BuildFile(path string) error {

func (self *Build) Visit(path string, entry fs.DirEntry, err error) error { check(err) - if !self.isSource(entry) { return nil } + if !self.isSource(entry) { + return nil + } check(self.BuildFile(path)) return nil }

- func (self *Build) Run(state *State, args *[]string) (err error) { defer handle(&err)

diff --git a/src/core/lua/build.go b/src/core/lua/build.go index 5edad0a..9afa3f4 100644 --- a/src/core/lua/build.go +++ b/src/core/lua/build.go @@ -6,10 +6,10 @@ import ( )

type Build struct { - MDPath string + MDPath string DocPath string - Content string - Mode config.Mode + Content string + Mode config.Mode }

func (self *Lua) registerBuild() {

// Created by Pi66

// Copyright ©Pi66 2026