实现缓存策略的部分功能

This commit is contained in:
GoEdgeLab
2020-10-04 14:30:42 +08:00
parent 1bea7d00be
commit 925d13466d
17 changed files with 1751 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
package errors
import (
"errors"
"testing"
)
func TestNew(t *testing.T) {
t.Log(New("hello"))
t.Log(Wrap(errors.New("hello")))
t.Log(testError1())
t.Log(Wrap(testError1()))
t.Log(Wrap(testError2()))
}
func testError1() error {
return New("test error1")
}
func testError2() error {
return Wrap(testError1())
}