Skip to content

Commit

Permalink
schema, specs-go: fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Day <stephen.day@getcruise.com>
  • Loading branch information
stevvooe committed Dec 2, 2021
1 parent d3cd202 commit 0e094f3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion schema/backwards_compatibility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/schema"
"github.com/opencontainers/image-spec/specs-go/v1"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)

var compatMap = map[string]string{
Expand Down
4 changes: 2 additions & 2 deletions schema/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type fsLoader struct {
}

// JsonSource implements gojsonschema.JSONLoader.JsonSource. The "Json" capitalization needs to be maintained to conform to the interface.
func (l *fsLoader) JsonSource() interface{} { // nolint: golint
func (l *fsLoader) JsonSource() interface{} { // revive:disable-line:var-naming
return l.source
}

Expand Down Expand Up @@ -117,7 +117,7 @@ func decodeJSONUsingNumber(r io.Reader) (interface{}, error) {
}

// JsonReference implements gojsonschema.JSONLoader.JsonReference. The "Json" capitalization needs to be maintained to conform to the interface.
func (l *fsLoader) JsonReference() (gojsonreference.JsonReference, error) { // nolint: golint
func (l *fsLoader) JsonReference() (gojsonreference.JsonReference, error) { // revive:disable-line:var-naming
return gojsonreference.NewJsonReference(l.JsonSource().(string))
}

Expand Down
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package schema
import (
"net/http"

"github.com/opencontainers/image-spec/specs-go/v1"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
)

// Media types for the OCI image formats
Expand Down
1 change: 0 additions & 1 deletion schema/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func validate(t *testing.T, name string) {
}

for _, err := range errs {
// TOOD(stevvooe): This is nearly useless without file, line no.
printFields(t, "invalid", example.Mediatype, example.Title)
t.Error(err)
fmt.Println(example.Body, "---")
Expand Down
2 changes: 1 addition & 1 deletion specs-go/v1/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import "github.com/opencontainers/image-spec/specs-go"
type Index struct {
specs.Versioned

// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
MediaType string `json:"mediaType,omitempty"`

// Manifests references platform specific manifests.
Expand Down
2 changes: 1 addition & 1 deletion specs-go/v1/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "github.com/opencontainers/image-spec/specs-go"
type Manifest struct {
specs.Versioned

// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
// MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
MediaType string `json:"mediaType,omitempty"`

// Config references a configuration object for a container, by digest.
Expand Down

0 comments on commit 0e094f3

Please sign in to comment.