Hacker News new | ask | show | jobs
by bbkane 817 days ago
Do build-excluded files get tested with `go test`? (tbf, not sure it's practical to test most scripty tasks)
1 comments

Think of this as a way to have a file with package main, and a func main that does not interfere with your normal build process...

The best example of this, and a decent util is this: https://go.dev/src/crypto/tls/generate_cert.go

All of the real testing happens elsewhere this just provides utility.