mock

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 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
	EmbedString string
}

func (Embed) EmbedMethod

func (p Embed) EmbedMethod(_ int) string

type EmbedEmbed

type EmbedEmbed struct {
	EmbedEmbedString 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 added in v1.14.0

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) FuncTyped added in v1.10.2

func (p Env) FuncTyped(_ string) int

func (Env) GetInt added in v1.14.0

func (p Env) GetInt() int

func (Env) NotStringStringerEqual added in v1.14.0

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

func (Env) NotStringerStringEqual added in v1.14.0

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

func (Env) NotStringerStringerEqual added in v1.14.0

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

func (Env) StringStringerEqual added in v1.14.0

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

func (Env) StringerStringEqual added in v1.14.0

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

func (Env) StringerStringerEqual added in v1.14.0

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

func (Env) TimeEqualString added in v1.14.0

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 added in v1.14.0

func (f Foo) MethodWithArgs(prefix string) string

func (Foo) String added in v1.14.0

func (Foo) String() string

type Is added in v1.14.0

type Is struct{}

func (Is) Nil added in v1.14.0

func (Is) Nil(a any) bool

type MapStringIntEnv added in v1.14.0

type MapStringIntEnv map[string]int

type MapStringStringEnv added in v1.14.0

type MapStringStringEnv map[string]string

func (MapStringStringEnv) Split added in v1.14.0

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

type MyFunc added in v1.10.5

type MyFunc func(string) int

type StringerPatcher added in v1.14.0

type StringerPatcher struct{}

func (*StringerPatcher) Visit added in v1.14.0

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

Jump to

Keyboard shortcuts

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