Skip to content

Commit

Permalink
Use errors.New
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrannajaryan committed Jul 22, 2022
1 parent 8c9612e commit 254432c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema/internal/parser_checks.go
Expand Up @@ -15,6 +15,7 @@
package internal // import "go.opentelemetry.io/otel/schema/internal"

import (
"errors"
"fmt"
"net/url"
"strconv"
Expand Down Expand Up @@ -63,7 +64,7 @@ func CheckFileFormatField(fileFormat string, supportedFormatMajor, supportedForm
// CheckSchemaURL verifies that schemaURL is valid.
func CheckSchemaURL(schemaURL string) error {
if strings.TrimSpace(schemaURL) == "" {
return fmt.Errorf("schema_url field is missing")
return errors.New("schema_url field is missing")
}

if _, err := url.Parse(schemaURL); err != nil {
Expand Down

0 comments on commit 254432c

Please sign in to comment.