user: move User into config package

- Add YAML tags for the fields
This commit is contained in:
Alex Crawford
2014-09-21 16:33:01 -07:00
parent 85b8d804c8
commit 4b472795c4
3 changed files with 23 additions and 20 deletions

View File

@@ -39,7 +39,7 @@ type CloudConfig struct {
}
WriteFiles []config.File `yaml:"write_files"`
Hostname string
Users []system.User
Users []config.User
ManageEtcHosts config.EtcHosts `yaml:"manage_etc_hosts"`
NetworkConfigPath string
NetworkConfig string
@@ -85,7 +85,7 @@ func warnOnUnrecognizedKeys(contents string, warn warner) {
// Check for any badly-specified users, if any are set
if users, ok := c["users"]; ok {
var known map[string]interface{}
b, _ := yaml.Marshal(&system.User{})
b, _ := yaml.Marshal(&config.User{})
yaml.Unmarshal(b, &known)
if set, ok := users.([]interface{}); ok {