config: make errors a bit nicer

This commit is contained in:
Mitchell Hashimoto 2014-07-22 18:29:45 -07:00
parent 0e091224c9
commit 625fb65526
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package config package config
import ( import (
"fmt"
"reflect" "reflect"
"regexp" "regexp"
"strings" "strings"
@ -102,7 +103,10 @@ func (w *interpolationWalker) Primitive(v reflect.Value) error {
replaceVal, err := w.F(i) replaceVal, err := w.F(i)
if err != nil { if err != nil {
return err return fmt.Errorf(
"%s: %s",
key,
err)
} }
if w.Replace { if w.Replace {