Add doc to TLS type

This commit is contained in:
Christian Claus 2018-04-09 15:27:21 +02:00
parent 309ea480b0
commit de022f7304
2 changed files with 7 additions and 6 deletions

View file

@ -1,10 +1,10 @@
package app package app
import ( import (
"github.com/spf13/viper"
"fmt" "fmt"
"os" "github.com/spf13/viper"
"log" "log"
"os"
) )
// Config represents the configuration of the server application. // Config represents the configuration of the server application.
@ -14,6 +14,7 @@ type Config struct {
TLS *TLS TLS *TLS
} }
// TLS allows specification of a certificate and private key file
type TLS struct { type TLS struct {
CertFile string CertFile string
KeyFile string KeyFile string
@ -23,7 +24,7 @@ type TLS struct {
func ParseConfig() Config { func ParseConfig() Config {
var cfg Config var cfg Config
setDefaults(); setDefaults()
viper.SetConfigName("config") viper.SetConfigName("config")
viper.AddConfigPath("./config") viper.AddConfigPath("./config")
viper.AddConfigPath("$HOME/.swd") viper.AddConfigPath("$HOME/.swd")

View file

@ -1,11 +1,11 @@
package main package main
import ( import (
"golang.org/x/net/webdav"
"net/http"
"github.com/micromata/swd/app"
"fmt" "fmt"
"github.com/micromata/swd/app"
"golang.org/x/net/webdav"
"log" "log"
"net/http"
) )
func main() { func main() {