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

Applied gofmt and most of go lint's suggestions #192

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

eldang
Copy link
Contributor

@eldang eldang commented Oct 3, 2023

I am unsure if this is helpful or not; if you'd rather I didn't do this then I'll also revert the changes in my fork. I've simply gone through gofmt, go vet, and go lint as a way to get myself more familiar with the code, and applied all suggestions that wouldn't be a non-trivial code edit. Some of the exported function comments are rather redundant, but I figure that having them in makes it easier to scan the rest of go lint's output for more important feedback.

Comment on lines -47 to +57
var globalDb *pgxpool.Pool = nil
var globalDb *pgxpool.Pool

// globalVersions holds the parsed output of postgis_full_version()
var globalVersions map[string]string = nil
var globalVersions map[string]string

// globalPostGISVersion is numeric, sortable postgis version (3.2.1 => 3002001)
var globalPostGISVersion int = 0
var globalPostGISVersion int

// serverBounds are the coordinate reference system and extent from
// which tiles are constructed
var globalServerBounds *Bounds = nil
var globalServerBounds *Bounds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was surprised by this set of go lint suggestions, but the rationale it offers is that in each case the assignment is of what would be the default value anyway.

@pramsey
Copy link
Collaborator

pramsey commented Oct 4, 2023

I'm OK to merge this if it won't bork up any further work you've done.

@eldang
Copy link
Contributor Author

eldang commented Oct 5, 2023

I'm OK to merge this if it won't bork up any further work you've done.

All good - all I've done since this is looking around relevant parts of the pg_featureserv code to think about what to do next.

@pramsey pramsey merged commit 0a999b1 into CrunchyData:master Oct 5, 2023
3 checks passed
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