blob: ca1ec43fcdec46672c300c563cf0d624592d3a00 [file] [log] [blame]
# Test of -filter flag.
deadcode -filter=other.net example.com
want `package "other.net"`
want `func Dead`
!want `func Live`
!want `package "example.com"`
!want `func unreferenced`
-- go.work --
use example.com
use other.net
-- example.com/go.mod --
module example.com
go 1.18
-- example.com/main.go --
package main
import "other.net"
func main() {
other.Live()
}
func unreferenced() {}
-- other.net/go.mod --
module other.net
go 1.18
-- other.net/other.go --
package other
func Live() {}
func Dead() {}