maddy/config/config.go
fox.cpp 5f8f447a36
config: Move parser code into config/parser
To keep it separate from other code in 'config' package that now
contains many shared configuration matchers.
2019-10-16 02:05:06 +03:00

18 lines
309 B
Go

package config
import (
"fmt"
"github.com/foxcpp/maddy/config/parser"
)
type (
Node = parser.Node
)
func NodeErr(node *Node, f string, args ...interface{}) error {
if node.File == "" {
return fmt.Errorf(f, args...)
}
return fmt.Errorf("%s:%d: %s", node.File, node.Line, fmt.Sprintf(f, args...))
}