adverr/error_tmpl_test.go

20 lines
288 B
Go
Raw Normal View History

2020-09-09 11:48:46 +02:00
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")
}