package cnb import ( "context" "cnb.cool/cnb/go-cnb/cnb" ) func ListReleases(ctx context.Context, client *cnb.Client, repoName string) ([]cnb.Release, error) { releases, rsp, err := client.Releases.List(ctx, repoName) if err != nil { return nil, err } handleHttpResponse(rsp) return releases, nil } func GetReleasesByID(ctx context.Context, client *cnb.Client, repoName, id string) (*cnb.Release, error) { release, rsp, err := client.Releases.GetByID(ctx, repoName, id) if err != nil { return nil, err } handleHttpResponse(rsp) return release, nil } func GetReleasesByTag(ctx context.Context, client *cnb.Client, repoName, tag string) (*cnb.Release, error) { release, rsp, err := client.Releases.GetByID(ctx, repoName, tag) if err != nil { return nil, err } handleHttpResponse(rsp) return release, nil }