1
0
Fork 0
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:
Kirill Zhuravlev 2023-02-15 00:19:35 +01:00 committed by Avelino
parent ab3d9909a1
commit 49e5c3ed2d
No known key found for this signature in database
GPG key ID: B345B4D52E98180A
3 changed files with 4 additions and 4 deletions

View file

@ -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)
} }

View file

@ -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())
} }

View file

@ -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