mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-04 07:40:56 +08:00
实现缓存策略的部分功能
This commit is contained in:
22
internal/errors/error_test.go
Normal file
22
internal/errors/error_test.go
Normal 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())
|
||||
}
|
||||
Reference in New Issue
Block a user