diff --git a/buildpacks/java/java/func_yaml.go b/buildpacks/java/java/func_yaml.go index 71e1e6b1..775a6659 100644 --- a/buildpacks/java/java/func_yaml.go +++ b/buildpacks/java/java/func_yaml.go @@ -35,33 +35,15 @@ func ParseFuncYaml(filedir string, logger bard.Logger) FuncYaml { options := optionsToMap(cfg.Options, logger) envs := envsToMap(cfg.Envs, logger) - name := getName(cfg.Envs, cfg.Name) + return FuncYaml{ - Name: name, + Name: cfg.Name, Options: options, Envs: envs, Exists: true, } } -func getName(envs knfn.Envs, nameFromYaml string) string { - result := nameFromYaml - - if envs == nil { - return result - } - - for _, e := range envs { - key := *e.Name - if key == "FUNCTION_NAME" { - result = *e.Value - break - } - } - - return result -} - func envsToMap(envs knfn.Envs, logger bard.Logger) map[string]string { result := map[string]string{} if envs == nil {