255 return r, nil
256}
257
258func (p *Provider) releaseList(app string) (structs.Releases, error) {259 krs, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(app)).List(am.ListOptions{})
260 if err != nil {
261 return nil, errors.WithStack(err)
230 return p.releaseUnmarshal(kr)
231}
232
233func (p *Provider) releaseGet(app, id string) (*structs.Release, error) {234 kr, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(app)).Get(strings.ToLower(id), am.GetOptions{})
235 if err != nil {
236 return nil, errors.WithStack(err)
221 return nil
222}
223
224func (p *Provider) releaseCreate(r *structs.Release) (*structs.Release, error) {225 kr, err := p.Convox.ConvoxV1().Releases(p.AppNamespace(r.App)).Create(p.releaseMarshal(r))
226 if err != nil {
227 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
}