https://pantsbuild.org/ logo
#general
Title
# general
g

gray-sugar-70433

06/23/2017, 8:51 PM
@witty-crayon-22786 do you know of an example somewhere? I’m doing something like this without success (running
./pants run backend/example
panics with
data.txt not available
)
Copy code
backend/example
├── BUILD
├── data.txt
└── main.go
Where backend is my go source root. Here’s the go file (just in case).
Copy code
// 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:
Copy code
go_binary()