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, "#!")
|
||||
}
|
||||
|
||||
func NewScript(userdata string) (Script, error) {
|
||||
return Script(userdata), nil
|
||||
func NewScript(userdata string) (*Script, error) {
|
||||
s := Script(userdata)
|
||||
return &s, nil
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user