Skip to content

Commit 8ee4280

Browse files
committed
Switch unixfs.Metadata.MimeType to optional
*** THIS IS A BREAKING CHANGE *** as per [1]: "Required is forever" Nevertheless this seems like a good idea at this time: there are no known producers ( nor consumers ) of MetaData nodes, and the current requirement of MimeType has an extremely narrow application scope. This change could very well be rejected in lieu of implementing a new type of node ( e.g. TheRealMetadata ) in the DataType enum. Based on ipfs#3451 (comment) License: MIT Signed-off-by: Mib Kd743naq <[email protected]> [1] https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
1 parent a7abc9c commit 8ee4280

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

unixfs/pb/unixfs.pb.go

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unixfs/pb/unixfs.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ message Data {
1616
}
1717

1818
message Metadata {
19-
required string MimeType = 1;
19+
optional string MimeType = 1;
2020
}

0 commit comments

Comments
 (0)