github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/build_plugin_non_main.txt (about)

     1  # Plugins are only supported on linux,cgo and darwin,cgo.
     2  [!linux] [!darwin] skip
     3  [!cgo] skip
     4  
     5  go build -n testdep/p2
     6  ! go build -buildmode=plugin testdep/p2
     7  stderr '-buildmode=plugin requires exactly one main package'
     8  
     9  -- testdep/p1/p1.go --
    10  package p1
    11  -- testdep/p1/p1_test.go --
    12  package p1
    13  
    14  import _ "testdep/p2"
    15  -- testdep/p2/p2.go --
    16  package p2
    17