match

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 7 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyNode

func AnyNode() match.GoNode

func AnyOf

func AnyOf(matchers ...match.GoNode) match.GoNode

func ArrayType

func ArrayType(elt, l match.GoNode) match.GoNode

func BasicLit

func BasicLit(value string) match.GoNode

func CallExpr

func CallExpr(fun match.GoNode, args GoNodes) match.GoNode

func Commands

func Commands() []match.GoNode

func CompositeLit

func CompositeLit(t match.GoNode) match.GoNode

func Config

func Config(key string) []match.GoNode

func EqualNode

func EqualNode(n dst.Node) match.GoNode

func FirstOf

func FirstOf(n match.GoNode) match.GoNode

func Func

func Func(name match.GoNode) match.GoNode

func Ident

func Ident(name string) match.GoNode

func Import

func Import(path string, name ...string) match.GoNode

func Imports

func Imports() []match.GoNode

func Jobs

func Jobs() []match.GoNode

func KeyValueExpr

func KeyValueExpr(key, value match.GoNode) match.GoNode

func LastOf

func LastOf(n match.GoNode) match.GoNode

func Migrations

func Migrations() []match.GoNode

func Providers

func Providers() []match.GoNode

func Seeders

func Seeders() []match.GoNode

func SelectorExpr

func SelectorExpr(x, sel match.GoNode) match.GoNode

func TypeOf

func TypeOf[T any](_ T) match.GoNode

func ValidationFilters

func ValidationFilters() []match.GoNode

func ValidationRules

func ValidationRules() []match.GoNode

Types

type GoNode

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

func (GoNode) MatchCursor

func (r GoNode) MatchCursor(cursor *dstutil.Cursor) bool

func (GoNode) MatchNode

func (r GoNode) MatchNode(node dst.Node) bool

type GoNodes

type GoNodes []match.GoNode

func AnyNodes

func AnyNodes() GoNodes

func (GoNodes) MatchNodes

func (r GoNodes) MatchNodes(nodes []dst.Node) bool

Jump to

Keyboard shortcuts

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