summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-11-25 16:15:33 +0100
committerLibravatar GitHub <noreply@github.com>2024-11-25 16:15:33 +0100
commitc454b1b4882389122964c75d7d764b51312743f7 (patch)
tree919fafe8c2983a54d7e48371c7bfc7d494073df7 /internal
parent[docs] Added note to documentation about mutuals-only posts not being functio... (diff)
downloadgotosocial-c454b1b4882389122964c75d7d764b51312743f7.tar.xz
[chore] Bump tooling versions, bump go -> v1.23.0 (#3258)
* [chore] Bump tooling versions, bump go -> v1.23.0 * undo silly change * sign * bump go version in go.mod * allow overflow in imaging * goreleaser deprecation notices * bump versions * undo accidental rebase change * update container versions to just use latest major version * update swagger to our release with go1.23 fix * update goreleaser to use our vendored swagger version --------- Co-authored-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal')
-rw-r--r--internal/db/bundb/bundb.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go
index d10f372fd..8756e086b 100644
--- a/internal/db/bundb/bundb.go
+++ b/internal/db/bundb/bundb.go
@@ -420,13 +420,12 @@ func maxOpenConns() int {
// deriveBunDBPGOptions takes an application config and returns either a ready-to-use set of options
// with sensible defaults, or an error if it's not satisfied by the provided config.
func deriveBunDBPGOptions() (*pgx.ConnConfig, error) {
- url := config.GetDbPostgresConnectionString()
-
- // if database URL is defined, ignore other DB related configuration fields
- if url != "" {
- cfg, err := pgx.ParseConfig(url)
- return cfg, err
+ // If database URL is defined, ignore
+ // other DB-related configuration fields.
+ if url := config.GetDbPostgresConnectionString(); url != "" {
+ return pgx.ParseConfig(url)
}
+
// these are all optional, the db adapter figures out defaults
address := config.GetDbAddress()