mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
cmd/dendrite-media-api-server: Move os.Getenv() for consistency
This commit is contained in:
parent
1057e2e117
commit
04c4a2d05a
|
|
@ -30,11 +30,12 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
bindAddr = os.Getenv("BIND_ADDRESS")
|
||||
dataSource = os.Getenv("DATABASE")
|
||||
logDir = os.Getenv("LOG_DIR")
|
||||
serverName = os.Getenv("SERVER_NAME")
|
||||
basePath = os.Getenv("BASE_PATH")
|
||||
bindAddr = os.Getenv("BIND_ADDRESS")
|
||||
dataSource = os.Getenv("DATABASE")
|
||||
logDir = os.Getenv("LOG_DIR")
|
||||
serverName = os.Getenv("SERVER_NAME")
|
||||
basePath = os.Getenv("BASE_PATH")
|
||||
maxFileSizeBytesString = os.Getenv("MAX_FILE_SIZE_BYTES")
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -50,7 +51,7 @@ func main() {
|
|||
if serverName == "" {
|
||||
serverName = "localhost"
|
||||
}
|
||||
maxFileSizeBytes, err := strconv.ParseInt(os.Getenv("MAX_FILE_SIZE_BYTES"), 10, 64)
|
||||
maxFileSizeBytes, err := strconv.ParseInt(maxFileSizeBytesString, 10, 64)
|
||||
if err != nil {
|
||||
maxFileSizeBytes = 10 * 1024 * 1024
|
||||
log.Infof("Failed to parse MAX_FILE_SIZE_BYTES. Defaulting to %v bytes.", maxFileSizeBytes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue