diff --git a/app/config.go b/app/config.go index 6df5bf1..379e1a3 100644 --- a/app/config.go +++ b/app/config.go @@ -1,10 +1,10 @@ package app import ( - "github.com/spf13/viper" "fmt" - "os" + "github.com/spf13/viper" "log" + "os" ) // Config represents the configuration of the server application. @@ -14,6 +14,7 @@ type Config struct { TLS *TLS } +// TLS allows specification of a certificate and private key file type TLS struct { CertFile string KeyFile string @@ -23,7 +24,7 @@ type TLS struct { func ParseConfig() Config { var cfg Config - setDefaults(); + setDefaults() viper.SetConfigName("config") viper.AddConfigPath("./config") viper.AddConfigPath("$HOME/.swd") diff --git a/cmd/server/main.go b/cmd/server/main.go index 802dd7f..f80bd11 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1,11 +1,11 @@ package main import ( - "golang.org/x/net/webdav" - "net/http" - "github.com/micromata/swd/app" "fmt" + "github.com/micromata/swd/app" + "golang.org/x/net/webdav" "log" + "net/http" ) func main() {