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

fix: Go syntax to add revive #1411

Merged
merged 37 commits into from
Dec 22, 2022
Merged

Conversation

mnagaa
Copy link
Contributor

@mnagaa mnagaa commented Dec 8, 2022

This PR adds revive.

Please check after merging #1410 .

For example, this PR fixes the following warning.

pkg/resources/function_grant.go:149:21: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)

pkg/snowflake/user.go:36:31: unexported-return: exported func ScanUser returns unexported type *snowflake.user, which can be annoying to use (revive)
func ScanUser(row *sqlx.Row) (*user, error) {
                              ^
pkg/snowflake/user_ownership_grant.go:72:45: unexported-return: exported func ScanUserOwnershipGrant returns unexported type *snowflake.userOwnershipGrant, which can be annoying to use (revive)
func ScanUserOwnershipGrant(row *sqlx.Row) (*userOwnershipGrant, error) {
                                            ^
pkg/snowflake/user.go:42:44: unexported-return: exported func ScanUserDescription returns unexported type *snowflake.user, which can be annoying to use (revive)
func ScanUserDescription(rows *sqlx.Rows) (*user, error) {
                                           ^
pkg/snowflake/user.go:103:45: unexported-return: exported func ListUsers returns unexported type []snowflake.user, which can be annoying to use (revive)
func ListUsers(pattern string, db *sql.DB) ([]user, error) {

Reference

@sfc-gh-swinkler
Copy link
Collaborator

/ok-to-test sha=e89e10d6

@sfc-gh-swinkler
Copy link
Collaborator

pkg/snowflake/user.go:36:31: unexported-return: exported func ScanUser returns unexported type *snowflake.user, which can be annoying to use (revive)

Yeah theres not really a good reason why these values are unexported, and it certainly was annoying to use them so I agree with this recommendation

@sfc-gh-swinkler sfc-gh-swinkler merged commit b484bc8 into Snowflake-Labs:main Dec 22, 2022
@sfc-gh-swinkler
Copy link
Collaborator

@mnagaa thank you for your contribution. After the holidays, I would like to do a video call with you and my manager to discuss the future of the provider. Please contact me at [email protected] if you would like to schedule something.

@github-actions
Copy link

Integration tests success for e89e10d6

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.

2 participants