cutter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cutter

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

Cutter is a lightweight version of Knife which is resterected for type information.

func New

func New(patterns ...string) (*Cutter, error)

New creates a Cutter.

func (*Cutter) Execute

func (c *Cutter) Execute(w io.Writer, pkg *knife.Package, tmpl any, opt *Option) error

Execute outputs the pkg with the format.

func (*Cutter) KnifePackages

func (c *Cutter) KnifePackages() []*knife.Package

KnifePackages returns knife packages.

func (*Cutter) Packages

func (c *Cutter) Packages() []*packages.Package

Packages returns packages.

func (*Cutter) Position added in v0.3.0

func (c *Cutter) Position(v any) token.Position

Position returns position of v.

type Option

type Option struct {
	ExtraData map[string]any
}

Option is a option of Execute.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳