github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/vendor_complex.txt (about)

     1  # smoke test for complex build configuration
     2  go build -o complex.exe complex
     3  [exec:gccgo] go build -compiler=gccgo -o complex.exe complex
     4  
     5  -- complex/main.go --
     6  package main
     7  
     8  import (
     9  	_ "complex/nest/sub/test12"
    10  	_ "complex/nest/sub/test23"
    11  	"complex/w"
    12  	"v"
    13  )
    14  
    15  func main() {
    16  	println(v.Hello + " " + w.World)
    17  }
    18  
    19  -- complex/nest/sub/test12/p.go --
    20  package test12
    21  
    22  // Check that vendor/v1 is used but vendor/v2 is NOT used (sub/vendor/v2 wins).
    23  
    24  import (
    25  	"v1"
    26  	"v2"
    27  )
    28  
    29  const x = v1.ComplexNestVendorV1
    30  const y = v2.ComplexNestSubVendorV2
    31  
    32  -- complex/nest/sub/test23/p.go --
    33  package test23
    34  
    35  // Check that vendor/v3 is used but vendor/v2 is NOT used (sub/vendor/v2 wins).
    36  
    37  import (
    38  	"v2"
    39  	"v3"
    40  )
    41  
    42  const x = v3.ComplexNestVendorV3
    43  const y = v2.ComplexNestSubVendorV2
    44  
    45  -- complex/nest/sub/vendor/v2/v2.go --
    46  package v2
    47  
    48  const ComplexNestSubVendorV2 = true
    49  
    50  -- complex/nest/vendor/v1/v1.go --
    51  package v1
    52  
    53  const ComplexNestVendorV1 = true
    54  
    55  -- complex/nest/vendor/v2/v2.go --
    56  package v2
    57  
    58  const ComplexNestVendorV2 = true
    59  
    60  -- complex/nest/vendor/v3/v3.go --
    61  package v3
    62  
    63  const ComplexNestVendorV3 = true
    64  
    65  -- complex/vendor/v/v.go --
    66  package v
    67  
    68  const Hello = "hello"
    69  
    70  -- complex/w/w.go --
    71  package w
    72  
    73  const World = "world"