Skip to content
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

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

yzxiu
Copy link
Contributor

@yzxiu yzxiu commented Jan 14, 2023

Part of #1680

Checklist:

  • Create a file in pkg/api/types/${cmd}_types.go, and define the CommandOption for this command
  • Create some file in pkg/cmd/${cmd}, and move the command entry point in real into this package

Signed-off-by: yaozhenxiu 946666800@qq.com

}
if f, ok := w.(formatter.Flusher); ok {
return f.Flush()
options := &types.NetworkListCommandOptions{
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
return nil
return network.List(options, cmd.OutOrStdout())
Copy link
Member

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

return image.List(cmd.Context(), options)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@yzxiu yzxiu changed the title Refactor network list [Refactor]Refactor network list Jan 15, 2023
@yzxiu yzxiu changed the title [Refactor]Refactor network list [Refactor] Refactor network list Jan 15, 2023
Copy link
Member

@djdongjin djdongjin left a 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>
@AkihiroSuda
Copy link
Member

Thanks

@AkihiroSuda AkihiroSuda merged commit e961e66 into containerd:main Jan 16, 2023
@AkihiroSuda AkihiroSuda added this to the v1.2.0 milestone Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants