gotools/cmd/deadcode/testdata/basic.txtar

# Test of basic functionality.

 deadcode -filter= example.com

 want "T.Goodbye"
 want "T.Goodbye2"
 want "T.Goodbye3"
!want "T.Hello"
 want "unreferenced"

 want "Scanf"
 want "Printf"
!want "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 (*T) Goodbye2() { fmt.Println("goodbye2") }
func (*A) Goodbye3() { fmt.Println("goodbye3") }

type A = T

func unreferenced() {}