genreadme

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 9 Imported by: 0

README

Genreadme

Go doc

暂无介绍...

目录导航

列出了该 package 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️

展开 / 折叠目录导航

包级函数定义

函数名称 描述
New 暂无描述...

类型定义

类型 名称 描述
STRUCT Builder 暂无描述...

详情信息

func New(pkgDirPath string, output string) (*Builder, error)


Builder STRUCT
type Builder struct {
	p *astgo.Package
	b *strings.Builder
	o string
}

func (*Builder) Generate() error
查看 / 收起单元测试

func TestBuilder_Generate(t *testing.T) {
	filepath.Walk("D:/sources/minotaur", func(path string, info fs.FileInfo, err error) error {
		if !info.IsDir() {
			return nil
		}
		if strings.Contains(strings.TrimPrefix(path, "D:/sources/minotaur"), ".") {
			return nil
		}
		b, err := New(path, filepath.Join(path, "README.md"))
		if err != nil {
			return nil
		}
		if err = b.Generate(); err != nil {
			panic(err)
		}
		return nil
	})
}


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func New

func New(pkgDirPath string, output string) (*Builder, error)

func (*Builder) Generate

func (b *Builder) Generate() error

Jump to

Keyboard shortcuts

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