Text file src/cmd/go/testdata/script/vet_deps.txt

     1  env GO111MODULE=off
     2  
     3  # Issue 30296. Verify that "go vet" uses only immediate dependencies.
     4  
     5  # First run fills the cache.
     6  go vet a
     7  
     8  go vet -x a
     9  ! stderr 'transitive'
    10  
    11  -- a/a.go --
    12  package a
    13  
    14  import "b"
    15  
    16  func F() {
    17  	b.F()
    18  }
    19  
    20  -- b/b.go --
    21  package b
    22  
    23  import "transitive"
    24  
    25  func F() {
    26  	transitive.F()
    27  }
    28  
    29  -- transitive/c.go --
    30  package transitive
    31  
    32  func F() {
    33  }
    34  
    35  

View as plain text