* Cleanup usage of go.rice in favor of go:embed
The usage of go.rice predates the availability of go:embed, but we
should switch to using go:embed instead to ship specific assets like
config files that we need.
go.rice is also incompatible with Go 1.19 and while it might see a fix
in the future, it seems better to go with the recommended Go approach
that is available these days.
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
* Move vtctld to also use `go embed` instead of go.rice
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
* Remove last rice-box related comments
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
* Remove config moving
This right now breaks building the actual tests since the tests might
also end up loading the regular code which has a `go embed` and refers
to the package with the config embeds.
This doesn't mean that the config isn't properly included in the
binaries. Also with using `go embed` we have a build time dependency on
the files and we always know the latest is included, so we don't have
the issue of potentially outdated files either.
All in all, it seems simplest to remove this logic and trust that Go
itself works as advertised.
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
* Unit test to confirm mysqlctl rice box is current
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Test for all files in config directory
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Flag rice box as generated file
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Rename const per review comment
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Tell both cli and github about generated proto files: hides diffs in 'git diff' in cli (but not in 'git status') and should improve not loading these files by default in github files diff
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Move changes to root .gitattributes
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Move changes to root .gitattributes
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
* Add generated parser code
Signed-off-by: Rohit Nayak <rohit@planetscale.com>