mock

package
v1.17.8 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Abstract

type Abstract interface {
	Method(int) int
}

type Bar

type Bar struct {
	Baz string
}

type Embed

type Embed struct {
	EmbedEmbed
	*EmbedPointerEmbed
	EmbedString string
}

func (Embed) EmbedMethod

func (p Embed) EmbedMethod(_ int) string

type EmbedEmbed

type EmbedEmbed struct {
	EmbedEmbedString string
}

type EmbedPointerEmbed added in v1.15.8

type EmbedPointerEmbed struct {
	EmbedPointerEmbedInt int
}

func (EmbedPointerEmbed) EmbedPointerEmbedMethod added in v1.15.8

func (p EmbedPointerEmbed) EmbedPointerEmbedMethod(_ int) string

func (*EmbedPointerEmbed) EmbedPointerEmbedPointerReceiverMethod added in v1.15.8

func (p *EmbedPointerEmbed) EmbedPointerEmbedPointerReceiverMethod(_ int) string

type Env

type Env struct {
	Embed
	Ambiguous          string
	Any                any
	Bool               bool
	Float              float64
	Int64              int64
	Int32              int32
	Int, One, Two      int
	Uint32             uint32
	Uint64             uint64
	Float32            float32
	Float64            float64
	String             string
	BoolPtr            *bool
	FloatPtr           *float64
	IntPtr             *int
	IntPtrPtr          **int
	StringPtr          *string
	Foo                Foo
	Abstract           Abstract
	ArrayOfAny         []any
	ArrayOfInt         []int
	ArrayOfString      []string
	ArrayOfFoo         []*Foo
	MapOfFoo           map[string]Foo
	MapOfAny           map[string]any
	MapIntAny          map[int]string
	FuncParam          func(_ bool, _ int, _ string) bool
	FuncParamAny       func(_ any) bool
	FuncTooManyReturns func() (int, int, error)
	FuncNamed          MyFunc
	NilAny             any
	NilInt             *int
	NilFn              func()
	NilStruct          *Foo
	NilSlice           []any
	Variadic           func(_ int, _ ...int) bool
	Fast               func(...any) any
	Time               time.Time
	TimePlusDay        time.Time
	Duration           time.Duration
}

func (Env) Add

func (Env) Add(a, b int) int

func (Env) Func

func (p Env) Func() int

func (Env) FuncFoo

func (p Env) FuncFoo(_ Foo) int

func (Env) FuncInt added in v1.16.9

func (p Env) FuncInt(_ int) int

func (Env) FuncInt8 added in v1.16.9

func (p Env) FuncInt8(_ float64) int

func (Env) FuncInt16 added in v1.16.9

func (p Env) FuncInt16(_ int16) int

func (Env) FuncInt32 added in v1.16.9

func (p Env) FuncInt32(_ int32) int

func (Env) FuncInt64 added in v1.16.9

func (p Env) FuncInt64(_ int64) int

func (Env) FuncTyped

func (p Env) FuncTyped(_ string) int

func (Env) FuncUint added in v1.16.9

func (p Env) FuncUint(_ uint) int

func (Env) FuncUint8 added in v1.16.9

func (p Env) FuncUint8(_ uint8) int

func (Env) FuncUint16 added in v1.16.9

func (p Env) FuncUint16(_ uint16) int

func (Env) FuncUint32 added in v1.16.9

func (p Env) FuncUint32(_ uint32) int

func (Env) FuncUint64 added in v1.16.9

func (p Env) FuncUint64(_ uint64) int

func (Env) GetInt

func (p Env) GetInt() int

func (Env) NotStringStringerEqual

func (Env) NotStringStringerEqual(s string, f fmt.Stringer) bool

func (Env) NotStringerStringEqual

func (Env) NotStringerStringEqual(f fmt.Stringer, s string) bool

func (Env) NotStringerStringerEqual

func (Env) NotStringerStringerEqual(f fmt.Stringer, g fmt.Stringer) bool

func (Env) StringStringerEqual

func (Env) StringStringerEqual(s string, f fmt.Stringer) bool

func (Env) StringerStringEqual

func (Env) StringerStringEqual(f fmt.Stringer, s string) bool

func (Env) StringerStringerEqual

func (Env) StringerStringerEqual(f fmt.Stringer, g fmt.Stringer) bool

func (Env) TimeEqualString

func (p Env) TimeEqualString(a time.Time, s string) bool

type Foo

type Foo struct {
	Value string
	Bar   Bar
}

func (Foo) Method

func (Foo) Method() Bar

func (Foo) MethodWithArgs

func (f Foo) MethodWithArgs(prefix string) string

func (Foo) String

func (Foo) String() string

func (Foo) VariadicMethod added in v1.17.8

func (Foo) VariadicMethod(_ ...string) bool

type Is

type Is struct{}

func (Is) Nil

func (Is) Nil(a any) bool

type MapStringIntEnv

type MapStringIntEnv map[string]int

type MapStringStringEnv

type MapStringStringEnv map[string]string

func (MapStringStringEnv) Split

func (m MapStringStringEnv) Split(s, sep string) []string

type MyFunc

type MyFunc func(string) int

type StringerPatcher

type StringerPatcher struct{}

func (*StringerPatcher) Visit

func (*StringerPatcher) Visit(node *ast.Node)

Jump to

Keyboard shortcuts

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