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

This commit is contained in:
GoEdgeLab
2020-10-02 17:22:32 +08:00
parent e4faed22d4
commit 9f4119b892
14 changed files with 595 additions and 56 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())
}