gitee.com/quant1x/gox@v1.21.2/api/copier_test.go (about)

     1  package api
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  type TT struct {
     9  	A int
    10  	B int
    11  }
    12  
    13  func TestCopy(t *testing.T) {
    14  	t1 := TT{
    15  		A: 1,
    16  		B: 2,
    17  	}
    18  	var t2 TT
    19  	_ = Copy(&t2, &t1)
    20  	fmt.Println(t2)
    21  }