types

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Bool            = reflect.TypeOf(false)
	Interface       = reflect.TypeOf((*interface{})(nil)).Elem()
	FmtStringer     = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
	Error           = reflect.TypeOf((*error)(nil)).Elem()
	JsonUnmarshaler = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() //nolint: golint
	Time            = reflect.TypeOf(time.Time{})
	Int             = reflect.TypeOf(int(0))
	Uint8           = reflect.TypeOf(uint8(0))
	Rune            = reflect.TypeOf(rune(0))
	String          = reflect.TypeOf("")
)

Functions

func IsStruct added in v1.8.0

func IsStruct(t reflect.Type) bool

IsStruct returns true if "t" is a struct or a pointer on a struct (whatever the number of chained pointers), false otherwise.

Types

type RawInt

type RawInt int

RawInt implements TestDeepStringer interface.

func (RawInt) String

func (i RawInt) String() string

type RawString

type RawString string

RawString implements TestDeepStringer interface.

func (RawString) String

func (s RawString) String() string

type TestDeepStamp

type TestDeepStamp struct{}

TestDeepStamp is a useful type providing the _TestDeep() method needed to implement TestDeepStringer interface.

type TestDeepStringer

type TestDeepStringer interface {
	String() string
	// contains filtered or unexported methods
}

TestDeepStringer is a TestDeep specific interface for objects which know how to stringify themselves.

Jump to

Keyboard shortcuts

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