-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] Refactor network list #1851
Conversation
cmd/nerdctl/network_ls.go
Outdated
} | ||
if f, ok := w.(formatter.Flusher); ok { | ||
return f.Flush() | ||
options := &types.NetworkListCommandOptions{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change to non-pointer return type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
cmd/nerdctl/network_ls.go
Outdated
} | ||
return nil | ||
return network.List(options, cmd.OutOrStdout()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably should add a context.Context
argument and pass in cmd.Context()
, similar to
Line 133 in cfe96a9
return image.List(cmd.Context(), options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: yaozhenxiu <946666800@qq.com>
Thanks |
Part of #1680
Checklist:
Signed-off-by: yaozhenxiu 946666800@qq.com