1
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:
Adhityaa
2018-06-10 23:13:42 +05:30
parent 42a58f1d87
commit 8b0d198934
10 changed files with 27 additions and 28 deletions

View File

@ -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)