diff options
author | 0x1a8510f2 <admin@0x1a8510f2.space> | 2024-05-01 01:38:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 00:38:36 +0000 |
commit | 46902e5766cc8efcc4f1abb38789f8179893c17d (patch) | |
tree | 5995442264119a6028f55bcb069a2899b7d1b032 /setup/base | |
parent | 5547bf8ca67af325df6560ab13e54d04c39c629b (diff) |
Take advantage of changes in recent Go versions (#3361)
Given that #2714 wasn't merged but we are now at a minimum supported Go
version of 1.20 (soon to be 1.21), I wanted to carry over some of the
changes. Namely:
- Fix the log typo
- Simplify build constraints for unix
- Use stdlib atomic package
### Pull Request Checklist
<!-- Please read
https://matrix-org.github.io/dendrite/development/contributing before
submitting your pull request -->
* [x] I have added Go unit tests or [Complement integration
tests](https://github.com/matrix-org/complement) for this PR _or_ I have
justified why this PR doesn't need tests
* [x] Pull request includes a [sign off below using a legally
identifiable
name](https://matrix-org.github.io/dendrite/development/contributing#sign-off)
_or_ I have already signed off privately
Signed-off-by: `0x1a8510f2 <admin@0x1a8510f2.space>`
---------
Co-authored-by: devonh <devon.dmytro@gmail.com>
Diffstat (limited to 'setup/base')
-rw-r--r-- | setup/base/base.go | 2 | ||||
-rw-r--r-- | setup/base/sanity_other.go | 4 | ||||
-rw-r--r-- | setup/base/sanity_unix.go | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/setup/base/base.go b/setup/base/base.go index 455337e5..82068aa9 100644 --- a/setup/base/base.go +++ b/setup/base/base.go @@ -28,13 +28,13 @@ import ( _ "net/http/pprof" "os" "os/signal" + "sync/atomic" "syscall" "time" sentryhttp "github.com/getsentry/sentry-go/http" "github.com/matrix-org/gomatrixserverlib/fclient" "github.com/prometheus/client_golang/prometheus/promhttp" - "go.uber.org/atomic" "github.com/gorilla/mux" "github.com/kardianos/minwinsvc" diff --git a/setup/base/sanity_other.go b/setup/base/sanity_other.go index d35c2e87..38e2b941 100644 --- a/setup/base/sanity_other.go +++ b/setup/base/sanity_other.go @@ -1,5 +1,5 @@ -//go:build !linux && !darwin && !netbsd && !freebsd && !openbsd && !solaris && !dragonfly && !aix -// +build !linux,!darwin,!netbsd,!freebsd,!openbsd,!solaris,!dragonfly,!aix +//go:build !unix +// +build !unix package base diff --git a/setup/base/sanity_unix.go b/setup/base/sanity_unix.go index 0403df1a..90e38a6d 100644 --- a/setup/base/sanity_unix.go +++ b/setup/base/sanity_unix.go @@ -1,5 +1,5 @@ -//go:build linux || darwin || netbsd || freebsd || openbsd || solaris || dragonfly || aix -// +build linux darwin netbsd freebsd openbsd solaris dragonfly aix +//go:build unix +// +build unix package base |