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

Base64 example #28

Open
mozey opened this issue Jan 24, 2022 · 0 comments
Open

Base64 example #28

mozey opened this issue Jan 24, 2022 · 0 comments

Comments

@mozey
Copy link
Owner

mozey commented Jan 24, 2022

Create an example of using a base64 string, e.g.

// configBase64 must be compiled with ldflags,
// read config from env if this is not set
var configBase64 string

func main() {
	// Config
	if configBase64 != "" {
		err := config.SetEnvBase64(configBase64)
		if err != nil {
			log.Error().Stack().Err(err).Msg("")
			return os.Exit(1)
		}
	}
	conf := config.New()

	// ...
}

TODO Option to lock base64 values only, even if empty, i.e. don't read from env?

This was referenced Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant