Visitar URL original
azcontainerregistry: move method to function by stevekuznetsov · Pull Request #23270 · Azure/azure-sdk-for-go · GitHub
Skip to content

azcontainerregistry: move method to function - #23270

Merged
Chenjie Shi (tadelesh) merged 1 commit into
Azure:mainfrom
stevekuznetsov:skuznets/method-to-function
Aug 6, 2024
Merged

Chenjie Shi (tadelesh) merged 1 commit into
Azure:mainfrom
stevekuznetsov:skuznets/method-to-function

Conversation

@stevekuznetsov

Copy link
Copy Markdown
Contributor

The Go documentation strongly discourages structs from having methods with both pointer recievers and non-pointer recievers. For the auth policy, getChallengeRequest presumably did not have a pointer reciever since it did not make use of the struct at all. We can simply move this to a function.

@github-actions github-actions Bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Aug 2, 2024
@github-actions

github-actions Bot commented Aug 2, 2024

Copy link
Copy Markdown

Thank you for your contribution Steve Kuznetsov (@stevekuznetsov)! We will review the pull request and get back to you soon.

@chlowell Charles Lowell (chlowell) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for contributing this!

The Go documentation strongly discourages structs from having methods
with both pointer recievers and non-pointer recievers. For the auth
policy, `getChallengeRequest` presumably did not have a pointer reciever
since it did not make use of the struct at all. We can simply move this
to a function.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
auto-merge was automatically disabled August 5, 2024 14:11

Head branch was pushed to by a user without write access

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

Chenjie Shi (@tadelesh) sorry, looks like auto-merge didn't go through. Updated the formatting, pushed again.

@tadelesh
Chenjie Shi (tadelesh) merged commit ea67e9c into Azure:main Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants