package config type Check struct { Name string `yaml:"name"` Type string `yaml:"type"` Attrs map[string]interface{} `yaml:",inline"` } func (chk Check) NameOrType() string { if chk.Name == "" { return chk.Type } return chk.Name }