value

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is[T any](x any) bool

func IsExprError

func IsExprError(pass *analysis.Pass, expr ast.Expr) bool

func IsNil

func IsNil(exp ast.Expr, pass *analysis.Pass) bool

Types

type ErrValue

type ErrValue struct {
	Value
	// contains filtered or unexported fields
}

func (ErrValue) IsError

func (e ErrValue) IsError() bool

func (ErrValue) IsFunc

func (e ErrValue) IsFunc() bool

func (ErrValue) IsValueInt

func (e ErrValue) IsValueInt() bool

func (ErrValue) IsValueNumeric

func (e ErrValue) IsValueNumeric() bool

func (ErrValue) IsValueZero

func (e ErrValue) IsValueZero() bool

type IntValue

type IntValue struct {
	Value
	// contains filtered or unexported fields
}

func (IntValue) GetIntValue

func (i IntValue) GetIntValue() int64

func (IntValue) IsError

func (i IntValue) IsError() bool

func (IntValue) IsFunc

func (i IntValue) IsFunc() bool

func (IntValue) IsValueInt

func (i IntValue) IsValueInt() bool

func (IntValue) IsValueNumeric

func (i IntValue) IsValueNumeric() bool

func (IntValue) IsValueZero

func (i IntValue) IsValueZero() bool

type IntValuer

type IntValuer interface {
	GetIntValue() int64
}

type UnspecifiedValue

type UnspecifiedValue struct {
	Value
}

func (UnspecifiedValue) IsError

func (u UnspecifiedValue) IsError() bool

func (UnspecifiedValue) IsFunc

func (u UnspecifiedValue) IsFunc() bool

func (UnspecifiedValue) IsValueInt

func (u UnspecifiedValue) IsValueInt() bool

func (UnspecifiedValue) IsValueNumeric

func (u UnspecifiedValue) IsValueNumeric() bool

func (UnspecifiedValue) IsValueZero

func (u UnspecifiedValue) IsValueZero() bool

type Value

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

func New

func New(orig, clone ast.Expr, pass *analysis.Pass) Value

func (Value) GetType

func (v Value) GetType() gotypes.Type

func (Value) GetValue

func (v Value) GetValue() constant.Value

func (Value) GetValueExpr

func (v Value) GetValueExpr() ast.Expr

func (Value) IsInterface

func (v Value) IsInterface() bool

func (Value) IsNil

func (v Value) IsNil() bool

func (Value) IsPointer

func (v Value) IsPointer() bool

type Valuer

type Valuer interface {
	GetValue() constant.Value
	GetType() gotypes.Type
	GetValueExpr() ast.Expr
	IsValueZero() bool
	IsValueInt() bool
	IsValueNumeric() bool
	IsError() bool
	IsFunc() bool
	IsInterface() bool
	IsPointer() bool
}

func GetValuer

func GetValuer(orig, clone ast.Expr, pass *analysis.Pass) Valuer

Jump to

Keyboard shortcuts

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