mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-21 16:55:38 +03:00
6c9bc26a6d
cmp.Or was introduced in Go 1.22 and picks the first value that's not the zero value for the type. For a string, the zero value is the empty string, which is what os.Getenv will return if the environment variable is not set. That then results in "error" being returned instead. This allows loading an environment variable with a default without having to do the check and write out the conditional. |
||
---|---|---|
.. | ||
media | ||
config.go | ||
db.go | ||
email.go | ||
federatingdb.go | ||
federator.go | ||
gin.go | ||
log.go | ||
mediahandler.go | ||
oauthserver.go | ||
processor.go | ||
router.go | ||
storage.go | ||
testmodels.go | ||
transportcontroller.go | ||
util.go |