Add a leading space after the comment sign

Fix coding standards

Signed-off-by: Tony Fang <nhfang@amazon.com>
This commit is contained in:
Tony Fang
2023-02-26 01:41:47 +00:00
parent f53417921d
commit 8a47c6910f
5 changed files with 20 additions and 20 deletions

View File

@@ -130,10 +130,10 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
}
var platSpec ocispec.Platform
//Only when all-platforms not specified, we will check platform value
//Implicitly if the platforms is empty, it means all-platforms
// Only when all-platforms not specified, we will check platform value
// Implicitly if the platforms is empty, it means all-platforms
if !context.Bool("all-platforms") {
//If platform specified, use that one, if not use default
// If platform specified, use that one, if not use default
if platform := context.String("platform"); platform != "" {
platSpec, err = platforms.Parse(platform)
if err != nil {
@@ -147,12 +147,12 @@ If foobar.tar contains an OCI ref named "latest" and anonymous ref "sha256:deadb
if !context.Bool("no-unpack") {
snapshotter := context.String("snapshotter")
//If OS field is not empty, it means platSpec was updated in the above block
//i.e all-platforms was not specified
// If OS field is not empty, it means platSpec was updated in the above block
// i.e all-platforms was not specified
if platSpec.OS != "" {
opts = append(opts, image.WithUnpack(platSpec, snapshotter))
} else {
//empty spec means all platforms
// Empty spec means all platforms
var emptySpec ocispec.Platform
opts = append(opts, image.WithUnpack(emptySpec, snapshotter))
}

View File

@@ -114,7 +114,7 @@ command. As part of this process, we do the following:
}
sopts = append(sopts, image.WithPlatforms(p...))
//set unpack configuration
// Set unpack configuration
for _, platform := range p {
sopts = append(sopts, image.WithUnpack(platform, context.String("snapshotter")))
}
@@ -125,8 +125,8 @@ command. As part of this process, we do the following:
if context.Bool("metadata-only") {
sopts = append(sopts, image.WithAllMetadata)
// Any with an empty set is None
// TODO: Specify way to specify not default platorm
//config.PlatformMatcher = platforms.Any()
// TODO: Specify way to specify not default platform
// config.PlatformMatcher = platforms.Any()
} else if context.Bool("all-metadata") {
sopts = append(sopts, image.WithAllMetadata)
}