blob: a2a29497cbe6379799390f41792d94537d89b79e [file] [log] [blame]
# 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() {}