adverr/error_tmpl_test.go
2020-09-09 11:48:46 +02:00

20 lines
288 B
Go

package adverr
import (
"fmt"
"testing"
)
var (
ErrDoStuffFailed = NewErrTmpl("ErrDoStuffFailed", "test error: %s")
)
func TestErrTmpl(t *testing.T) {
err := doTemplateStuff()
fmt.Println(err)
}
func doTemplateStuff() error {
return ErrDoStuffFailed.New("because of reasons")
}