Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup usage of go.rice in favor of go:embed #10956

Merged
merged 4 commits into from
Aug 9, 2022

Commits on Aug 9, 2022

  1. 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 <[email protected]>
    dbussink committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    f16e495 View commit details
    Browse the repository at this point in the history
  2. Move vtctld to also use go embed instead of go.rice

    Signed-off-by: Dirkjan Bussink <[email protected]>
    dbussink committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    73fabe1 View commit details
    Browse the repository at this point in the history
  3. Remove last rice-box related comments

    Signed-off-by: Dirkjan Bussink <[email protected]>
    dbussink committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    203a187 View commit details
    Browse the repository at this point in the history
  4. 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 <[email protected]>
    dbussink committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    16c6431 View commit details
    Browse the repository at this point in the history