refavour

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const TagOrder = "order"

Variables

This section is empty.

Functions

func CheckCanBeChanged

func CheckCanBeChanged(value interface{}) error

Проверить Можно ли изменять приемник данных --------------------------------------------

func CheckKind

func CheckKind(value interface{}, expectedKind reflect.Kind) error

Проверить Kind ---------------

func CheckMap

func CheckMap(data interface{}) error

Проверить Мапа Ли ? -------------------------

func CheckSlice

func CheckSlice(data interface{}) error

Проверить Слайс Ли ? -------------------------

func CheckStructure

func CheckStructure(data interface{}) error

Проверить Структура Ли ? -------------------------

func GetReflectValue

func GetReflectValue(s interface{}) reflect.Value

Получить значение рефлекса -------------------------------

Types

type CantBeSetError

type CantBeSetError struct{}

Ошибка - Поле структуры не может быть установлено --------------------------------------------------

func (*CantBeSetError) Error

func (e *CantBeSetError) Error() string

type FieldInfo

type FieldInfo struct {
	Type  reflect.Type
	Order int
}

type FieldsInfo

type FieldsInfo map[string]FieldInfo

Типы полей структуры -------------------------------

func GetStructureFieldsTypes

func GetStructureFieldsTypes(value interface{}) (FieldsInfo, error)

Функция читает из интерфейса структуру и формирует список имен полей и их типы -------------------------------------------------------------------------------

type KindNotMatchedError

type KindNotMatchedError struct {
	Expected string
	Actual   string
}

Ошибка - Kind не совпадает ---------------------------

func (*KindNotMatchedError) Error

func (e *KindNotMatchedError) Error() string

Jump to

Keyboard shortcuts

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