config: add Validate func, small lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-22 14:54:43 +03:00
parent 5527b16cd8
commit c64218d52c
15 changed files with 177 additions and 52 deletions

View File

@@ -11,13 +11,13 @@ import (
func TestStructfields(t *testing.T) {
type Config struct {
Wait time.Duration
Time time.Time
Nested *Config
Metadata map[string]int
Broker string
Addr []string
Wait time.Duration
Verbose bool
Nested *Config
}
cfg := &Config{Nested: &Config{}}
fields, err := rutil.StructFields(cfg)