blob: e629e0573b1616c36e674b59736ba118e208e1da [file] [log] [blame]
# Test of line-oriented output.
deadcode "-format={{range .Funcs}}{{println .Name}}{{end}}" -filter= example.com
want "(example.com.T).Goodbye"
!want "(example.com.T).Hello"
want "example.com.unreferenced"
want "fmt.Scanf"
want "fmt.Printf"
!want "fmt.Println"
-- go.mod --
module example.com
go 1.18
-- main.go --
package main
import "fmt"
type T int
func main() {
var x T
x.Hello()
}
func (T) Hello() { fmt.Println("hello") }
func (T) Goodbye() { fmt.Println("goodbye") }
func unreferenced() {}