Skip to content

Commit

Permalink
Rename to BySlugModel
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax authored and joelrebel committed Sep 20, 2023
1 parent f475a89 commit a431042
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/model/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Component struct {
type Components []*Component

// BySlug returns a component that matches the slug value.
func (c Components) BySlugVendorModel(cSlug string, cModels []string) *Component {
func (c Components) BySlugModel(cSlug string, cModels []string) *Component {
for idx, component := range c {
// skip non matching component slug
if !strings.EqualFold(cSlug, component.Slug) {
Expand Down
2 changes: 1 addition & 1 deletion internal/outofband/action_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (h *actionHandler) checkCurrentFirmware(a sw.StateSwitch, c sw.TransitionAr
return err
}

component := components.BySlugVendorModel(action.Firmware.Component, action.Firmware.Models)
component := components.BySlugModel(action.Firmware.Component, action.Firmware.Models)
if component == nil {
tctx.Logger.WithFields(
logrus.Fields{
Expand Down

0 comments on commit a431042

Please sign in to comment.