New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minify manifest json #29
Conversation
Signed-off-by: Gsealy <jiaojingwei1001@hotmail.com>
@@ -317,7 +317,7 @@ func cryptChildren(ctx context.Context, cs content.Store, desc ocispec.Descripto | |||
Layers: newLayers, | |||
} | |||
|
|||
mb, err := json.MarshalIndent(newManifest, "", " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are couple other instances of this, could you change them at the same time? Thanks!
cmd/ctr/commands/commands.go:181: b, err := json.MarshalIndent(x, "", " ")
images/encryption/encryption.go:320: mb, err := json.MarshalIndent(newManifest, "", " ")
images/encryption/encryption.go:400: mb, err := json.MarshalIndent(newIndex, "", " ")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Signed-off-by: Gsealy <jiaojingwei1001@hotmail.com>
@@ -178,7 +178,7 @@ func LabelArgs(labelStrings []string) map[string]string { | |||
|
|||
// PrintAsJSON prints input in JSON format | |||
func PrintAsJSON(x interface{}) { | |||
b, err := json.MarshalIndent(x, "", " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just leave it as is. This whole file is an extended copy of the corresponding file from containerd: https://github.com/containerd/containerd/blob/v1.5.0-beta.0/cmd/ctr/commands/commands.go#L206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can compress it when save or output OCI image tar? not affect input json
closed. |
fix: #28