helper

package
v0.0.0-...-6ea5f18 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportListBuilder

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

ImportListBuilder 是一个 go-import 列表构建器

func (*ImportListBuilder) Add

func (inst *ImportListBuilder) Add(adding *model.GoImport) *model.GoImport

Add 添加一条go-import 记录

func (*ImportListBuilder) AddComplexType

func (inst *ImportListBuilder) AddComplexType(t *model.ComplexType, disableHash bool)

AddComplexType 添加一条go-import 记录

func (*ImportListBuilder) AddPackagePath

func (inst *ImportListBuilder) AddPackagePath(pkgPath string, disableHash bool) *model.GoImport

AddPackagePath 添加一条go-import 记录

func (*ImportListBuilder) AddSimpleType

func (inst *ImportListBuilder) AddSimpleType(t *model.SimpleType, disableHash bool)

AddSimpleType 添加一条go-import 记录

func (*ImportListBuilder) Create

func (inst *ImportListBuilder) Create() []*model.GoImport

Create 创建go-import 列表

type ThisPackagePathComputer

type ThisPackagePathComputer struct{}

ThisPackagePathComputer 工具:根据路径取完整的包名

func (*ThisPackagePathComputer) Compute

func (inst *ThisPackagePathComputer) Compute(ctx *configen.Context, path fs.Path) (string, error)

Compute 计算包名

Jump to

Keyboard shortcuts

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