Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions config/gonew_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/bmatsuo/go-validate"
"io/ioutil"
"os"
"strings"
)

type configInheritanceGraph map[string]map[string]interface{}
Expand Down Expand Up @@ -111,9 +110,7 @@ type ExternalTemplate string
func (config ExternalTemplate) Validate() (err error) {
path := string(config)
var info os.FileInfo
if !strings.HasPrefix(path, "/") {
return errors.New("relative path " + path)
} else if info, err = os.Stat(path); err != nil {
if info, err = os.Stat(path); err != nil {
return
} else if !info.IsDir() {
return errors.New("not a directory " + path)
Expand Down