cloudinit/config/script.go
2014-11-07 10:13:52 -08:00

17 lines
270 B
Go

package config
import (
"strings"
)
type Script []byte
func IsScript(userdata string) bool {
header := strings.SplitN(userdata, "\n", 2)[0]
return strings.HasPrefix(header, "#!")
}
func NewScript(userdata string) (Script, error) {
return Script(userdata), nil
}