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

all: format with Go 1.19 #1130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

charlievieth
Copy link
Contributor

@charlievieth charlievieth commented Feb 4, 2023

Update Go source files to use the '//go:build' lines introduced by Go 1.17 and the doc comment formatting introduced by Go 1.19. This formatting is not changed by Go 1.20.

Note: doc.go and the *userauth* files had to be manually changed in some places to fix indentation.

This does not change how godoc (at least with Go 1.19) renders the package documentation and is backwards compatible (i.e. earlier versions of gofmt will leave this code unchanged - tested with 1.17).

Copy link
Contributor

@dolmen dolmen 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, except the C example that must be indented.

doc.go Outdated
return;
}
sqlite3_result_int(context, 1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Lines 39 to 53 must be indented further.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch - fixed.

@dolmen
Copy link
Contributor

dolmen commented Oct 17, 2023

@mattn Please consider merging this. This is blocking further efforts aiming to improve documentation.

Update Go source files to use the '//go:build' lines introduced by
Go 1.17 and the doc comment formatting introduced by Go 1.19. This
formatting is not changed by Go 1.20.

Note: doc.go had to be changed in some places to remove double
indentation.
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (1603038) 46.80% compared to head (af13bcb) 46.59%.
Report is 6 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1130      +/-   ##
==========================================
- Coverage   46.80%   46.59%   -0.22%     
==========================================
  Files          12       12              
  Lines        1534     1526       -8     
==========================================
- Hits          718      711       -7     
+ Misses        673      672       -1     
  Partials      143      143              
Files Coverage Δ
sqlite3_go18.go 77.77% <ø> (-4.58%) ⬇️
sqlite3_load_extension.go 59.37% <ø> (ø)
sqlite3_opt_serialize.go 82.85% <ø> (ø)
sqlite3_opt_userauth_omit.go 10.00% <ø> (ø)
sqlite3.go 52.64% <50.00%> (ø)
callback.go 58.53% <33.33%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dolmen dolmen left a comment

Choose a reason for hiding this comment

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

LGTM

@dolmen
Copy link
Contributor

dolmen commented Oct 25, 2023

@mattn We definitely need this change merged before submitting further documentation improvements!

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.

None yet

3 participants