1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

json.RawMessage needs to be a pointer when embedded in a larger JSON struct to avoid double encoding problems.

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence
2016-03-11 16:08:21 -08:00
parent ca90842799
commit 2fd125c489

View File

@@ -126,9 +126,9 @@ var NotaryDefaultHashes = []string{notary.SHA256, notary.SHA512}
// FileMeta contains the size and hashes for a metadata or target file. Custom
// data can be optionally added.
type FileMeta struct {
Length int64 `json:"length"`
Hashes Hashes `json:"hashes"`
Custom json.RawMessage `json:"custom,omitempty"`
Length int64 `json:"length"`
Hashes Hashes `json:"hashes"`
Custom *json.RawMessage `json:"custom,omitempty"`
}
// CheckHashes verifies all the checksums specified by the "hashes" of the payload.