config: standardize interface a bit
This commit is contained in:
parent
9441586229
commit
d4c617fc23
@ -25,6 +25,7 @@ func IsScript(userdata string) bool {
|
|||||||
return strings.HasPrefix(header, "#!")
|
return strings.HasPrefix(header, "#!")
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewScript(userdata string) (Script, error) {
|
func NewScript(userdata string) (*Script, error) {
|
||||||
return Script(userdata), nil
|
s := Script(userdata)
|
||||||
|
return &s, nil
|
||||||
}
|
}
|
||||||
|
@ -220,8 +220,8 @@ func main() {
|
|||||||
switch t := ud.(type) {
|
switch t := ud.(type) {
|
||||||
case *config.CloudConfig:
|
case *config.CloudConfig:
|
||||||
ccu = t
|
ccu = t
|
||||||
case config.Script:
|
case *config.Script:
|
||||||
script = &t
|
script = t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user