mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
api: run go fmt
This commit is contained in:
@ -2,8 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func parseConfig() error {
|
||||
@ -29,15 +29,15 @@ func parseConfig() error {
|
||||
"SMTP_PORT": "",
|
||||
"SMTP_FROM_ADDRESS": "",
|
||||
|
||||
"GOOGLE_KEY": "",
|
||||
"GOOGLE_SECRET": "",
|
||||
"GOOGLE_KEY": "",
|
||||
"GOOGLE_SECRET": "",
|
||||
}
|
||||
|
||||
for key, value := range defaults {
|
||||
if os.Getenv("COMMENTO_" + key) == "" {
|
||||
if os.Getenv("COMMENTO_"+key) == "" {
|
||||
os.Setenv(key, value)
|
||||
} else {
|
||||
os.Setenv(key, os.Getenv("COMMENTO_" + key))
|
||||
os.Setenv(key, os.Getenv("COMMENTO_"+key))
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ func parseConfig() error {
|
||||
|
||||
static := os.Getenv("STATIC")
|
||||
for strings.HasSuffix(static, "/") {
|
||||
static = static[0:len(static)-1]
|
||||
static = static[0 : len(static)-1]
|
||||
}
|
||||
|
||||
file, err := os.Stat(static)
|
||||
|
Reference in New Issue
Block a user