github.com/andy2046/gopie@v0.7.0/pkg/nocopy/nocopy_test.go (about)

     1  package nocopy_test
     2  
     3  import (
     4  	. "github.com/andy2046/gopie/pkg/nocopy"
     5  	"testing"
     6  )
     7  
     8  type MyStruct struct {
     9  	noCopy NoCopy
    10  }
    11  
    12  func TestNoCopy(t *testing.T) {
    13  	// go vet fails
    14  	var m1 MyStruct
    15  	m2 := m1
    16  	var m3 = m1
    17  	m2 = m1
    18  	_, _ = m2, m3
    19  	t.Log("go vet fails here")
    20  }