Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Oct 17, 2024
1 parent 2e63e9e commit fe49866
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/service/contentprovider/moduleconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (rm *ResourcesMap) UnmarshalYAML(unmarshal func(interface{}) error) error {
}

func (rm ResourcesMap) MarshalYAML() (interface{}, error) {
var resources []resource
resources := []resource{}
for name, link := range rm {
resources = append(resources, resource{Name: name, Link: link})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/service/contentprovider/moduleconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ resources:
require.NoError(t, err)

roudTrippedModuleConfig := &contentprovider.ModuleConfig{}
err = yaml.Unmarshal([]byte(marshalledModuleConfigData), roudTrippedModuleConfig)
err = yaml.Unmarshal(marshalledModuleConfigData, roudTrippedModuleConfig)

require.NoError(t, err)
assert.Equal(t, expectedModuleConfig.Resources, roudTrippedModuleConfig.Resources)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func Test_ValidateModuleConfig(t *testing.T) {
"": "https://github.com/kyma-project/template-operator/releases/download/1.0.1/template-operator.yaml",
},
},
expectedError: fmt.Errorf("failed to validate resources: %s: name must not be empty", commonerrors.ErrInvalidOption),
expectedError: fmt.Errorf("failed to validate resources: %w: name must not be empty", commonerrors.ErrInvalidOption),
},
{
name: "invalid module resources - empty link",
Expand Down

0 comments on commit fe49866

Please sign in to comment.