Skip to content

Instantly share code, notes, and snippets.

@oscarnevarezleal
Created October 23, 2021 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oscarnevarezleal/532f0614228f13c3c472661b263ea1c4 to your computer and use it in GitHub Desktop.
Save oscarnevarezleal/532f0614228f13c3c472661b263ea1c4 to your computer and use it in GitHub Desktop.
func getBuildpackName(context packit.BuildContext) (string, error) {
var conf packit.BuildpackInfo
if _, err := toml.DecodeFile(filepath.Join(context.CNBPath, "buildpack.toml"), &conf); err != nil {
return "", err
}
return conf.Name, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment