Skip to content

Commit

Permalink
Avoid unnecessary type conversions (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannh committed Jul 16, 2023
1 parent ae67bb4 commit 13a78eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
package validator

import (
"bytes"
"context"
"errors"
"fmt"
"io"
"strings"

jsonschema "github.com/santhosh-tekuri/jsonschema/v5"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
Expand Down Expand Up @@ -257,7 +257,7 @@ func downloadSchema(registries []registry.Registry, kind, version, k8sVersion st
if err == nil {
c := jsonschema.NewCompiler()
c.Draft = jsonschema.Draft4
if err := c.AddResource(path, strings.NewReader(string(schemaBytes))); err != nil {
if err := c.AddResource(path, bytes.NewReader(schemaBytes)); err != nil {
continue
}
schema, err := c.Compile(path)
Expand Down

0 comments on commit 13a78eb

Please sign in to comment.