gray-sugar-70433
06/23/2017, 8:51 PM./pants run backend/example
panics with data.txt not available
)
backend/example
├── BUILD
├── data.txt
└── main.go
Where backend is my go source root. Here’s the go file (just in case).
// main.go
package main
import "io/ioutil"
func main() {
_, err := ioutil.ReadFile("data.txt")
if err != nil {
panic("data.txt not available")
}
}
And the BUILD file:
go_binary()