...

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

Documentation: cmd/go/testdata/script

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

View as plain text