mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Update Go version to 1.18 (#444)
* linting with new golangci-lint version * update go to 1.18 * bump versions in drone.yml * use new runtime/debug package for version info * remove Commit build flag from goreleaser * remove mock commit + version from build script * go fmt * add dummy version env flag to test container * install git in golang container for testing * only set versionString if Version is defined
This commit is contained in:
8
internal/cache/account.go
vendored
8
internal/cache/account.go
vendored
@@ -91,7 +91,13 @@ func (c *AccountCache) getByID(id string) (*gtsmodel.Account, bool) {
|
||||
if !ok {
|
||||
return nil, false
|
||||
}
|
||||
return copyAccount(v.(*gtsmodel.Account)), true
|
||||
|
||||
a, ok := v.(*gtsmodel.Account)
|
||||
if !ok {
|
||||
panic("account cache entry was not an account")
|
||||
}
|
||||
|
||||
return copyAccount(a), true
|
||||
}
|
||||
|
||||
// Put places a account in the cache, ensuring that the object place is a copy for thread-safety
|
||||
|
Reference in New Issue
Block a user