# Test of -generated flag output.
deadcode "-f={{range .Funcs}}{{$.Name}}.{{.Name}}{{end}}" example.com
!want "main.main"
want "main.Dead1"
!want "main.Dead2"
deadcode "-f={{range .Funcs}}{{$.Name}}.{{.Name}}{{end}}" -generated example.com
!want "main.main"
want "main.Dead1"
want "main.Dead2"
-- go.mod --
module example.com
go 1.18
-- main.go --
package main
func main() {}
func Dead1() {}
-- gen.go --
// Code generated by hand. DO NOT EDIT.
package main
func Dead2() {}