Skip to content

Commit

Permalink
changes for the PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
medmes committed Nov 28, 2024
1 parent a65f42b commit 7bda025
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/common/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ValidateIsValidHTTPSURL(input string) error {
func validateSemanticVersion(version string) error {
_, err := semver.StrictNewVersion(strings.TrimSpace(version))
if err != nil {
return fmt.Errorf("opts.ModuleVersion failed to parse as semantic version: %w",
return fmt.Errorf("opts.ModuleVersion failed to be parsed as semantic version: %w",
commonerrors.ErrInvalidOption)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/service/contentprovider/securityconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (s *SecurityConfig) validateArgs(args types.KeyValueArgs) error {
}

if value == "" {
return fmt.Errorf("%s: %w must not be empty", ArgModuleName, ErrInvalidArg)
return fmt.Errorf("%s must not be empty: %w", ArgModuleName, ErrInvalidArg)
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func Test_ValidateModuleConfig(t *testing.T) {
"module-icon": "https://example.com/path/to/some-icon",
},
},
expectedError: fmt.Errorf("opts.ModuleVersion failed to parse as semantic version: %w", commonerrors.ErrInvalidOption),
expectedError: fmt.Errorf("opts.ModuleVersion failed to be parsed as semantic version: %w", commonerrors.ErrInvalidOption),
},
{
name: "invalid module namespace",
Expand Down
2 changes: 1 addition & 1 deletion internal/service/scaffold/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func Test_Validate_Options(t *testing.T) {
ModuleVersion: "invalid",
},
wantErr: true,
errMsg: "opts.ModuleVersion failed to parse as semantic version",
errMsg: "opts.ModuleVersion failed to be parsed as semantic version",
},
{
name: "ModuleConfigFileName is empty",
Expand Down

0 comments on commit 7bda025

Please sign in to comment.