godotenv use autoload everywhere (#548)

This commit is contained in:
6543 2021-11-27 03:01:06 +01:00 committed by GitHub
parent e072e4cce7
commit 88236d8d59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,17 +18,13 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/joho/godotenv" _ "github.com/joho/godotenv/autoload"
"github.com/rs/zerolog/log"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/woodpecker-ci/woodpecker/version" "github.com/woodpecker-ci/woodpecker/version"
) )
func main() { func main() {
if err := godotenv.Load(".env"); err != nil {
log.Error().Err(err).Msg("load godotenv failed")
}
app := cli.NewApp() app := cli.NewApp()
app.Name = "woodpecker-server" app.Name = "woodpecker-server"
app.Version = version.String() app.Version = version.String()