20 lines
288 B
Go
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")
|
||
|
}
|