Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Switch unixfs.Metadata.MimeType to optional
Browse files Browse the repository at this point in the history
*** 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/kubo#3451 (comment)

License: MIT
Signed-off-by: Mib Kd743naq <mib.kd743naq@gmail.com>

[1] https://developers.google.com/protocol-buffers/docs/proto#specifying-field-rules
  • Loading branch information
mib-kd743naq committed Dec 2, 2016
1 parent b4c08b0 commit e94be52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions pb/unixfs.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pb/unixfs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ message Data {
}

message Metadata {
required string MimeType = 1;
optional string MimeType = 1;
}

0 comments on commit e94be52

Please sign in to comment.