hashicorp / aws-cloudformation-resource-schema-sdk-go

This package provides AWS CloudFormation Resource Schema functionality in Go
Mozilla Public License 2.0
5 stars 2 forks source link

Remove "error " prefix from `fmt.Errorf` returned `error` strings #35

Closed ewbankkit closed 2 years ago

ewbankkit commented 2 years ago

See this comment.

ewbankkit commented 2 years ago
% grep '"error ' *.go | grep Errorf
json_schema.go:     return nil, fmt.Errorf("error loading JSON Schema (%s): %w", document, err)
json_schema.go:     return nil, fmt.Errorf("error reading file (%s): %w", path, err)
json_schema.go:     return nil, fmt.Errorf("error getting current directory: %w", err)
resource_expand.go:     return fmt.Errorf("error expanding Resource (%s) Definitions: %w", *r.TypeName, err)
resource_expand.go:     return fmt.Errorf("error expanding Resource (%s) Properties: %w", *r.TypeName, err)
resource_expand.go:         return fmt.Errorf("error resolving %s: %w", propertyName, err)
resource_expand.go:             return fmt.Errorf("error resolving %s Items: %w", propertyName, err)
resource_expand.go:                 return fmt.Errorf("error resolving %s Items.Properties: %w", propertyName, err)
resource_expand.go:             return fmt.Errorf("error unwrapping %s OneOf Properties: %w", propertyName, err)
resource_expand.go:             return fmt.Errorf("error resolving %s Properties: %w", propertyName, err)
resource_expand.go:             return fmt.Errorf("error resolving %s PatternProperties: %w", propertyName, err)
resource_expand.go:             return fmt.Errorf("error unwrapping %s OneOf Properties: %w", propertyName, err)
resource_expand.go:                 return fmt.Errorf("error resolving %s Properties: %w", propertyName, err)
resource_json_schema.go:        return nil, fmt.Errorf("error parsing JSON Schema into Resource: %w", err)