Embed data files in the binary (#180)

Now that we're on Go 1.16+ we can do this easily! The main advantage is
it means users can build a genqlient binary and use that portably (or we
could distribute one, or whatever). Plus the code is marginally simpler;
the `embed` API is really quite nice.

Fixes #9.

Test plan:
```
make check
go build .
rm -rf generate               # pretend we have no checkout
./genqlient ./internal/integration/genqlient.yaml
./genqlient --init            # fails after generating a default config
```
This commit is contained in:
Ben Kraft
2022-03-22 12:00:56 -07:00
committed by GitHub
parent 13094c3e58
commit 36e86cf97f
4 changed files with 14 additions and 29 deletions
+2
View File
@@ -26,6 +26,8 @@ When releasing a new version:
### New features:
- genqlient can now run as a portable binary (i.e. without a local checkout of the repository or `go run`).
### Bug fixes:
## v0.4.0