实现缓存策略部分管理功能

This commit is contained in:
刘祥超
2020-10-02 17:22:24 +08:00
parent 0febe3e5bd
commit bd51284504
53 changed files with 1163 additions and 211 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())
}