Package xcon check and fill default value based on struct tags, also support custom check and fill method.

Supported method (within xcon tag):

	check for zero value

env = STRING
	if value is zero, fill with environment variable

default = STRING
	if value is zero, fill value with provided string

val = STR
	string equality check

val (>|<|>=|<=|<>|=) NUM
	compare scalar value
	value type: builtin scalar types

(max|min) = NUM
	identical to val (<=|>=) NUM

len (>|<|>=|<=|<>|=) INT
	len check
	value type: array, slice, map, string

cap (>|<|>=|<=|<>|=) INT
	cap check
	value type: slice, chan

enum = STRING1|STRING2|...
	enum check
	value type: string

	regexp check
	value type: string

To implement custom check and fill logic, just implement the 'Checker' interface.

Imports 1 package(s)


Test imports 1 package(s)