structify

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapStructifier

type MapStructifier = func(map[string]interface{}) (interface{}, error)

func MakeMapStructifier

func MakeMapStructifier(t reflect.Type, tag string) MapStructifier

MakeMapStructifier builds a function which parses a map's string values into a new struct of type t and returns a pointer to it. tag specifies which tag connects struct fields to map keys. MakeMapStructifier panics if it detects an unsupported type (suitable for usage in init() or global vars).

Jump to

Keyboard shortcuts

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