mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-13 11:14:37 -05:00
make function private as others
This commit is contained in:
parent
ab3d9909a1
commit
49e5c3ed2d
3 changed files with 4 additions and 4 deletions
2
main.go
2
main.go
|
@ -68,7 +68,7 @@ func renderAll() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err := ConvertAndRenderIndex(readmePath, outIndexFile)
|
err := convertAndRenderIndex(readmePath, outIndexFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to convert markdown to html: %w", err)
|
return fmt.Errorf("unable to convert markdown to html: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ func TestSeparator(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConvertAndRenderIndex(t *testing.T) {
|
func TestConvertAndRenderIndex(t *testing.T) {
|
||||||
err := ConvertAndRenderIndex(readmePath, outIndexFile)
|
err := convertAndRenderIndex(readmePath, outIndexFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("html generate error '%s'", err.Error())
|
t.Errorf("html generate error '%s'", err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/avelino/awesome-go/pkg/markdown"
|
"github.com/avelino/awesome-go/pkg/markdown"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConvertAndRenderIndex generate site html (index.html) from markdown file
|
// convertAndRenderIndex generate site html (index.html) from markdown file
|
||||||
func ConvertAndRenderIndex(srcFilename, outFilename string) error {
|
func convertAndRenderIndex(srcFilename, outFilename string) error {
|
||||||
input, err := os.ReadFile(srcFilename)
|
input, err := os.ReadFile(srcFilename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue