pkg

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

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WireCmd = "wire"
)

Variables

This section is empty.

Functions

func DirPathToImportPath

func DirPathToImportPath(dirPath string) string

./a/b/c/ => /a/b/c.

func ParseExpr

func ParseExpr(expr ast.Expr, fileContent string) string

Types

type CmdExec

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

func (*CmdExec) ExecBuild

func (ce *CmdExec) ExecBuild(dir string, args ...string) error

func (*CmdExec) ExecFmt

func (ce *CmdExec) ExecFmt(dir string, args ...string) error

func (*CmdExec) ExecTest

func (ce *CmdExec) ExecTest(dir string, args ...string) error

func (*CmdExec) ExecWire

func (ce *CmdExec) ExecWire(dir string, args ...string) error

type CmdExecOption

type CmdExecOption func(*CmdExec)

func WithCmdExecLogger

func WithCmdExecLogger(logger log.Logger) CmdExecOption

type Exec

type Exec interface {
	ExecWire(string, ...string) error

	ExecFmt(string, ...string) error

	ExecTest(string, ...string) error

	ExecBuild(string, ...string) error
}

func NewCmdExec

func NewCmdExec(options ...CmdExecOption) Exec

func NewNullExec

func NewNullExec() Exec

type Field

type Field struct {
	Name string

	Type string

	TypeName string

	// Name + type or type.
	Field string

	Size int

	Doc []string

	Tag string
}

Struct field.

type Fields

type Fields []Field

func (Fields) Len

func (fs Fields) Len() int

func (Fields) Less

func (fs Fields) Less(i, j int) bool

func (*Fields) ParseFromAst

func (fs *Fields) ParseFromAst(genDecl *ast.GenDecl, fileContent string)

func (Fields) String

func (fs Fields) String() (string, error)

func (Fields) Swap

func (fs Fields) Swap(i, j int)

type Import

type Import struct {
	Name string

	Path string

	Doc []string
}

type Imports

type Imports []Import

func (Imports) Len

func (is Imports) Len() int

func (*Imports) ParseFromAst

func (is *Imports) ParseFromAst(genDecl *ast.GenDecl)

func (Imports) String

func (is Imports) String() string

type NullExec

type NullExec struct{}

func (*NullExec) ExecBuild

func (ce *NullExec) ExecBuild(dir string, args ...string) error

func (*NullExec) ExecFmt

func (ce *NullExec) ExecFmt(dir string, args ...string) error

func (*NullExec) ExecTest

func (ce *NullExec) ExecTest(dir string, args ...string) error

func (*NullExec) ExecWire

func (ce *NullExec) ExecWire(dir string, args ...string) error

type Var

type Var struct {
	Doc []string

	// name and val
	Body string

	Name []string

	// now is empty
	Val []string
}

type Vars

type Vars []Var

func (Vars) Len

func (vs Vars) Len() int

func (*Vars) ParseFromAst

func (vs *Vars) ParseFromAst(genDecl *ast.GenDecl, src string)

func (Vars) String

func (vs Vars) String() string

Directories

Path Synopsis
pkcs12
Package pkcs12 implements some of PKCS#12.
Package pkcs12 implements some of PKCS#12.
pkcs12/internal/rc2
Package rc2 implements the RC2 cipher
Package rc2 implements the RC2 cipher

Jump to

Keyboard shortcuts

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