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

Improve doc comments for client constructors #19293

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

jhendrixMSFT
Copy link
Member

Fixes #19274

@jhendrixMSFT jhendrixMSFT marked this pull request as ready for review October 5, 2022 20:23
@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Oct 5, 2022
Copy link
Member

@richardpark-msft richardpark-msft left a comment

Choose a reason for hiding this comment

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

Looks good. Just had one question, but no changes required.

sdk/storage/azblob/blockblob/client.go Show resolved Hide resolved
@jhendrixMSFT jhendrixMSFT merged commit eff7206 into Azure:main Oct 5, 2022
@jhendrixMSFT jhendrixMSFT deleted the azblob_ctor_docs branch October 5, 2022 22:12
@@ -33,6 +33,8 @@ type BlobClientOptions struct {
}

// NewBlobClient creates a blob lease client for the provided blob client.
// - client - an instance of a blob client
// - options - client options; pass nil to accept the default values
func NewBlobClient[T appendblob.Client | blob.Client | blockblob.Client | pageblob.Client](client *T, options *BlobClientOptions) (*BlobClient, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Cool use of generics/constraints. for code hygiene, I recommend changing the order of the constraints:
blob.Client | blockblob.Client | appendblob.Client | pageblob.Client

Copy link
Member Author

@jhendrixMSFT jhendrixMSFT Oct 6, 2022

Choose a reason for hiding this comment

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

Ordering them from commonly used to least commonly used?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document the endpoint URL requirement for the various client constructors
3 participants