@@ -3,34 +3,34 @@ package errors
33// TODO: https://gochronicles.dev/posts/datastructures/list/singlylinkedlist/part-ii/
44
55import (
6- errs "errors"
6+ "errors"
77 "net/http"
88 "reflect"
99 "testing"
1010
11- "github.com/micro/go-micro/errors"
11+ myErrors "github.com/micro/go-micro/errors"
1212)
1313
1414func TestErrors (t * testing.T ) {
1515 testCases := []struct {
1616 name string
1717 values string
18- want * errors. Error
18+ want error
1919 }{
2020 {"EC1" , "not good" , AppError (EC1 )},
2121 }
2222
23- testData := []* errors .Error {
24- & errors .Error {
23+ testData := []* myErrors .Error {
24+ & myErrors .Error {
2525 Id : "go.micro.srv.account" ,
2626 Code : 422 ,
2727 Detail : "proto validation: sumo-val-error" ,
2828 Status : http .StatusText (422 ),
2929 },
3030 }
3131
32- appErrTestData := []* errors .Error {
33- & errors .Error {
32+ appErrTestData := []* myErrors .Error {
33+ & myErrors .Error {
3434 Id : "EC1" ,
3535 Code : 500 ,
3636 Detail : "not good" ,
@@ -55,13 +55,13 @@ func TestErrors(t *testing.T) {
5555 t .Fatalf ("Expected %s got %s" , e .Error (), ne .Error ())
5656 }
5757
58- ne2 := ValidationError ("go.micro.srv.account" , "proto validation: %v" , errs .New ("sumo-val-error" ))
58+ ne2 := ValidationError ("go.micro.srv.account" , "proto validation: %v" , errors .New ("sumo-val-error" ))
5959
6060 if e .Error () != ne2 .Error () {
6161 t .Fatalf ("Expected %s got %s" , e .Error (), ne2 .Error ())
6262 }
6363
64- pe := errors .Parse (ne .Error ())
64+ pe := myErrors .Parse (ne .Error ())
6565
6666 if pe == nil {
6767 t .Fatalf ("Expected error got nil %v" , pe )
0 commit comments