forked from TrueCloudLab/distribution
Use "Size" field to describe blobs over "Length"
After consideration, we've changed the main descriptor field name to for number of bytes to "size" to match convention. While this may be a subjective argument, commonly we refer to files by their "size" rather than their "length". This will match other conventions, like `(FileInfo).Size()` and methods on `io.SizeReaderAt`. Under more broad analysis, this argument doesn't necessarily hold up. If anything, "size" is shorter than "length". Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
92aa378df4
commit
26b7fe4a91
14 changed files with 63 additions and 42 deletions
4
blobs.go
4
blobs.go
|
@ -49,8 +49,8 @@ type Descriptor struct {
|
|||
// encoded as utf-8.
|
||||
MediaType string `json:"mediaType,omitempty"`
|
||||
|
||||
// Length in bytes of content.
|
||||
Length int64 `json:"length,omitempty"`
|
||||
// Size in bytes of content.
|
||||
Size int64 `json:"size,omitempty"`
|
||||
|
||||
// Digest uniquely identifies the content. A byte stream can be verified
|
||||
// against against this digest.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue