Skip to content

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 #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 a7abc9c commit 8ee4280
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions unixfs/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 unixfs/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;
}

1 comment on commit 8ee4280

@GitCop
Copy link

@GitCop GitCop commented on 8ee4280 Dec 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.