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