zeroshade commented on code in PR #265: URL: https://github.com/apache/iceberg-go/pull/265#discussion_r1925623222
########## catalog/rest.go: ########## @@ -491,11 +485,15 @@ func (r *RestCatalog) fetchAccessToken(cl *http.Client, creds string, opts *opti clientID, clientSecret = "", clientID } + scope := "catalog" + if opts.scope != nil { + scope = *opts.scope + } Review Comment: if it's not a pointer we can just do `if opts.scope != ""` and avoid the heap ########## catalog/rest.go: ########## @@ -491,11 +485,15 @@ func (r *RestCatalog) fetchAccessToken(cl *http.Client, creds string, opts *opti clientID, clientSecret = "", clientID } + scope := "catalog" + if opts.scope != nil { + scope = *opts.scope + } Review Comment: if it's not a pointer we can just do `if opts.scope != ""` and avoid the pointer -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org