reflektor

package module
v0.0.0-...-be98fad Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 7 Imported by: 0

README

it's just a reflektor

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMethod = errors.New("Method not found")
)
View Source
var (
	ErrInvalidTarget = errors.New("Invalid reflekt target. Must be a struct, interface or pointer to one.")
)
View Source
var (
	ErrUnrecognizedParam = errors.New("Unrecognized param found")
)

Functions

func Command

func Command(obj interface{})

func ParseIn

func ParseIn(arg string, dest reflect.Value) error

Types

type Func

type Func struct {
	Name     string
	InTypes  []string
	OutTypes []string
	// contains filtered or unexported fields
}

func (*Func) Call

func (fn *Func) Call(args ...string) *Result

type Reflekted

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

func Reflekt

func Reflekt(obj interface{}) (*Reflekted, error)

func (*Reflekted) Method

func (r *Reflekted) Method(method string) (*Func, error)

func (*Reflekted) Methods

func (r *Reflekted) Methods() []*Func

type Result

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

func (*Result) HasError

func (r *Result) HasError() (error, bool)

func (*Result) Len

func (r *Result) Len() int

func (*Result) Value

func (r *Result) Value(i int) interface{}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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