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

ls: use CoreAPI

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 01bbf29c
...@@ -133,6 +133,9 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix, ...@@ -133,6 +133,9 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
func UnixfsLsOptions(opts ...UnixfsLsOption) (*UnixfsLsSettings, error) { func UnixfsLsOptions(opts ...UnixfsLsOption) (*UnixfsLsSettings, error) {
options := &UnixfsLsSettings{ options := &UnixfsLsSettings{
Async: true, Async: true,
ResolveSize: true,
ResolveType: true,
} }
for _, opt := range opts { for _, opt := range opts {
...@@ -333,7 +336,7 @@ func (unixfsOpts) ResolveSize(resolve bool) UnixfsLsOption { ...@@ -333,7 +336,7 @@ func (unixfsOpts) ResolveSize(resolve bool) UnixfsLsOption {
func (unixfsOpts) ResolveType(resolve bool) UnixfsLsOption { func (unixfsOpts) ResolveType(resolve bool) UnixfsLsOption {
return func(settings *UnixfsLsSettings) error { return func(settings *UnixfsLsSettings) error {
settings.ResolveSize = resolve settings.ResolveType = resolve
return nil return nil
} }
} }
\ No newline at end of file
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