func NewBundleKey(definition bc.BundleDefinition) (key BundleKey) { key = BundleKey{ Name: definition.BundleName(), Version: definition.BundleVersion(), } return }
func (s *FakeBundleCollection) Get(definition bc.BundleDefinition) (bc.Bundle, error) { if len(definition.BundleName()) == 0 { return nil, errors.New("missing bundle name") } if len(definition.BundleVersion()) == 0 { return nil, errors.New("missing bundle version") } return s.FakeGet(definition), s.GetErr }
func (s *FakeBundleCollection) Get(definition bc.BundleDefinition) (bundle bc.Bundle, err error) { if len(definition.BundleName()) == 0 { err = errors.New("missing bundle name") return } if len(definition.BundleVersion()) == 0 { err = errors.New("missing bundle version") return } bundle = s.FakeGet(definition) return }
func NewBundleKey(definition bc.BundleDefinition) BundleKey { return BundleKey{ Name: definition.BundleName(), Version: definition.BundleVersion(), } }