MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / GetEnvVarKey

Method GetEnvVarKey

lib/crontab.go:768–777  ·  view source on GitHub ↗

GetEnvVarKey extracts the key from an environment variable line

()

Source from the content-addressed store, hash-verified

766
767// GetEnvVarKey extracts the key from an environment variable line
768func (l Line) GetEnvVarKey() string {
769 if !l.IsEnvVar() {
770 return ""
771 }
772 parts := strings.SplitN(l.FullLine, "=", 2)
773 if len(parts) > 0 {
774 return strings.TrimSpace(parts[0])
775 }
776 return ""
777}
778
779// GetEnvVarValue extracts the value from an environment variable line
780func (l Line) GetEnvVarValue() string {

Callers 1

MarshalJSONMethod · 0.95

Calls 1

IsEnvVarMethod · 0.95

Tested by

no test coverage detected