Skip to content

Commit

Permalink
address lint and gofmt issues
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
  • Loading branch information
mikebrow committed Jun 25, 2018
1 parent 321d636 commit e8d7941
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest/manifestlist/manifestlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func FromDescriptors(descriptors []ManifestDescriptor) (*DeserializedManifestLis
return FromDescriptorsWithMediaType(descriptors, mediaType)
}

// For testing purposes, it's useful to be able to specify the media type explicitly
// FromDescriptorsWithMediaType is for testing purposes, it's useful to be able to specify the media type explicitly
func FromDescriptorsWithMediaType(descriptors []ManifestDescriptor, mediaType string) (*DeserializedManifestList, error) {
m := ManifestList{
Versioned: manifest.Versioned{
Expand Down
6 changes: 3 additions & 3 deletions manifest/ocischema/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/opencontainers/image-spec/specs-go/v1"
)

// builder is a type for constructing manifests.
// Builder is a type for constructing manifests.
type Builder struct {
// bs is a BlobService used to publish the configuration blob.
bs distribution.BlobService
Expand Down Expand Up @@ -43,8 +43,8 @@ func NewManifestBuilder(bs distribution.BlobService, configJSON []byte, annotati
return mb
}

// For testing purposes, we want to be able to create an OCI image with
// either an MediaType either empty, or with the OCI image value
// SetMediaType assigns the passed mediatype or error if the mediatype is not a
// valid media type for oci image manifests currently: "" or "application/vnd.oci.image.manifest.v1+json"
func (mb *Builder) SetMediaType(mediaType string) {
if mediaType != "" && mediaType != v1.MediaTypeImageManifest {
panic("Invalid media type for OCI image manifest")
Expand Down
2 changes: 1 addition & 1 deletion registry/storage/manifeststore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func testOCIManifestStorage(t *testing.T, testname string, includeMediaTypes boo
}

manifestDescriptors := []manifestlist.ManifestDescriptor{
manifestlist.ManifestDescriptor{
{
Descriptor: descriptor,
Platform: platformSpec,
},
Expand Down

0 comments on commit e8d7941

Please sign in to comment.