249 return r, nil
250}
251
252func (p *Provider) releaseList(app string) (structs.Releases, error) {253 krs, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(app)).List(am.ListOptions{})
254 if err != nil {
255 return nil, errors.WithStack(err)
224 return p.releaseUnmarshal(kr)
225}
226
227func (p *Provider) releaseGet(app, id string) (*structs.Release, error) {228 kr, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(app)).Get(strings.ToLower(id), am.GetOptions{})
229 if err != nil {
230 return nil, errors.WithStack(err)
215 return nil
216}
217
218func (p *Provider) releaseCreate(r *structs.Release) (*structs.Release, error) {219 kr, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(r.App)).Create(p.releaseMarshal(r))
220 if err != nil {
221 return nil, errors.WithStack(err)
518 return data, nil
519}
520
521func (p *Provider) buildCreate(b *structs.Build) (*structs.Build, error) {522 kb, err := p.Convox.ConvoxV1().Builds(p.AppNamespace(b.App)).Create(p.buildMarshal(b))
523 if err != nil {
524 return nil, errors.WithStack(err)
67 return bytes.Join(parts, []byte("---\n")), nil
68}
69
70func applyLabels(data []byte, labels map[string]string) ([]byte, error) { 71 var v map[string]interface{}
72
73 if err := yaml.Unmarshal(data, &v); err != nil {
Methods or fields of struct that have names different only by capitalization could be confusing.
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
buildSystem string
// name of the build system to use
BuildSystem string
}
type SomeType struct {
// actual build system to be inferred, based on the `BuildSystem` passed by user
internalBuildSystem string
// name of the build system to use
BuildSystem string
}