Documentation ¶
Index ¶
- Constants
- Variables
- func Assert(actual interface{}, assert Assertion, expected ...interface{}) (bool, string)
- func InitConfig(c interface{}, initFuncs ...InitFunc) (err error)
- func StructFields(iface interface{}) (names []string, types map[string]string, tags map[string]reflect.StructTag)
- type Assertion
- type Config
- type InitFunc
Constants ¶
View Source
const ( ENV_PREFIX = "CONFOBJ_" TAG_DEFAULT = "default" TAG_REQUIRED = "required" TAG_ALIAS = "alias" TAG_ASSERTION = "should" TAG_ASSERTION_SEP = " " TAG_ASSERTION_VALUE = ":" TAG_ASSERTION_FIELD = "_" )
Variables ¶
View Source
var (
TestMode bool
)
Functions ¶
func InitConfig ¶
Types ¶
type Config ¶
type Config struct { MainConfig reflect.Value ConfigValues map[string]interface{} Initialized bool ConfigKeys *set.StringSet KeyAliases *set.StringSet AliasKeyMap map[string]string ConfigTypes map[string]string ConfigTags map[string]reflect.StructTag PanicOnAssignmentError bool Assertions map[string]map[string][]Assertion LogSet bool // contains filtered or unexported fields }
func (*Config) FieldForKey ¶
Click to show internal directories.
Click to hide internal directories.