config: standardize interface a bit

This commit is contained in:
Alex Crawford 2015-01-26 13:45:55 -08:00
parent 9441586229
commit d4c617fc23
2 changed files with 5 additions and 4 deletions

View File

@ -25,6 +25,7 @@ func IsScript(userdata string) bool {
return strings.HasPrefix(header, "#!")
}
func NewScript(userdata string) (Script, error) {
return Script(userdata), nil
func NewScript(userdata string) (*Script, error) {
s := Script(userdata)
return &s, nil
}

View File

@ -220,8 +220,8 @@ func main() {
switch t := ud.(type) {
case *config.CloudConfig:
ccu = t
case config.Script:
script = &t
case *config.Script:
script = t
}
}