Commit dbdf6fd6 authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi unixfs: options for RawLeaves / Inline

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 6c7f760b
......@@ -52,3 +52,18 @@ func (unixfsOpts) Hash(mhtype uint64) UnixfsAddOption {
return nil
}
}
func (unixfsOpts) RawLeaves(enable bool) UnixfsAddOption {
return func(settings *UnixfsAddSettings) error {
settings.RawLeaves = enable
settings.RawLeavesSet = true
return nil
}
}
func (unixfsOpts) InlineLimit(limit int) UnixfsAddOption {
return func(settings *UnixfsAddSettings) error {
settings.InlineLimit = limit
return nil
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment