feat(Go-StudyExample):2021/02/09:新增merge源码阅读和单测代码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package mergo_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
)
|
||||
|
||||
type testStruct struct {
|
||||
time.Duration
|
||||
}
|
||||
|
||||
func TestIssue50Merge(t *testing.T) {
|
||||
to := testStruct{}
|
||||
from := testStruct{}
|
||||
|
||||
if err := mergo.Merge(&to, from); err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user