Skip to content

refactor: reduce duplicate code#7100

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
junnplus:spec-opts
Jun 27, 2022
Merged

refactor: reduce duplicate code#7100
dmcgowan merged 1 commit intocontainerd:mainfrom
junnplus:spec-opts

Conversation

@junnplus
Copy link
Copy Markdown
Member

Signed-off-by: Ye Sijun [email protected]

Copy link
Copy Markdown
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

Given a comment regarding the function name.

Comment thread oci/spec_opts.go Outdated
Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

since making funcs out of these and using twice.. might as well do them up proper and add unit tests for them?

Other than the option of adding unit buckets and naming the funcs, this LGTM.

@junnplus junnplus force-pushed the spec-opts branch 2 times, most recently from 2f414e7 to 1ccd133 Compare June 25, 2022 08:59
@junnplus
Copy link
Copy Markdown
Member Author

junnplus commented Jun 25, 2022

@mikebrow I added two unit tests for WithUserID and WithUsername. PTAL, thanks!

Copy link
Copy Markdown
Member

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM very nice thanks!

@dmcgowan dmcgowan merged commit 555dc62 into containerd:main Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants