setter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotSupportKind - kind not support to set by string.
	ErrNotSupportKind = errors.New("not support kind")
	// ErrNotImplemented - not implemented yet functionality.
	ErrNotImplemented = errors.New("not implemented")
	// ErrNotSetField - field cannot be set.
	ErrNotSetField = errors.New("cannot be set")

	ErrIncorrectMaybeType = errors.New("incorrect Maybe type structure")
)

Functions

func SetSliceStrings

func SetSliceStrings(value reflect.Value, field reflect.StructField, strs []string) error

SetSliceStrings - set value by slice of strings

Support multi values only: Slice, Array other kindes set by string (first value from slice).

func SetString

func SetString(value reflect.Value, field reflect.StructField, str string) error

SetString - set value by string

Not implemented kinds: Complex, Chan.

func SetStringSilent added in v0.1.2

func SetStringSilent(value reflect.Value, field reflect.StructField, str string) error

Types

type GoWalkerMayber added in v0.1.2

type GoWalkerMayber interface {
	GoWalkerMaybe()
}

type SetStringer added in v0.0.8

type SetStringer interface {
	SetString(string) error
}

type Setter added in v0.1.2

type Setter interface {
	Set(string)
}

Jump to

Keyboard shortcuts

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