patcher

package
v1.16.11 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 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 OperatorOverloading

type OperatorOverloading struct {
	Operator  string              // Operator token to overload.
	Overloads []string            // List of function names to replace operator with.
	Env       *nature.Nature      // Env type.
	Functions conf.FunctionsTable // Env functions.
	// contains filtered or unexported fields
}

func (*OperatorOverloading) Check

func (p *OperatorOverloading) Check()

func (*OperatorOverloading) FindSuitableOperatorOverload

func (p *OperatorOverloading) FindSuitableOperatorOverload(l, r reflect.Type) (reflect.Type, string, bool)

func (*OperatorOverloading) ShouldRepeat

func (p *OperatorOverloading) ShouldRepeat() bool

func (*OperatorOverloading) Visit

func (p *OperatorOverloading) Visit(node *ast.Node)

type WithContext

type WithContext struct {
	Name string
}

WithContext adds WithContext.Name argument to all functions calls with a context.Context argument.

func (WithContext) Visit

func (w WithContext) Visit(node *ast.Node)

Visit adds WithContext.Name argument to all functions calls with a context.Context argument.

type WithTimezone

type WithTimezone struct {
	Location *time.Location
}

WithTimezone passes Location to date() and now() functions.

func (WithTimezone) Visit

func (t WithTimezone) Visit(node *ast.Node)

Directories

Path Synopsis
Package value provides a Patcher that uses interfaces to allow custom types that can be represented as standard go values to be used more easily in expressions.
Package value provides a Patcher that uses interfaces to allow custom types that can be represented as standard go values to be used more easily in expressions.

Jump to

Keyboard shortcuts

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