Document the Config struct's behavior correctly [#19] [#9]

This commit is contained in:
Erin Call 2019-12-23 16:45:09 -08:00
parent 285e9d98a4
commit 10e7e7fee5
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1

View file

@ -6,9 +6,8 @@ import (
// The Config struct captures the `settings` and `environment` blocks in the application's drone // The Config struct captures the `settings` and `environment` blocks in the application's drone
// config. Configuration in drone's `settings` block arrives as uppercase env vars matching the // config. Configuration in drone's `settings` block arrives as uppercase env vars matching the
// config key, prefixed with `PLUGIN_`. Config from the `environment` block is *not* prefixed; any // config key, prefixed with `PLUGIN_`. Config from the `environment` block is uppercased, but does
// keys that are likely to be in that block (i.e. things that use `from_secret` need an explicit // not have the `PLUGIN_` prefix. It may, however, be prefixed with the value in `$PLUGIN_PREFIX`.
// `envconfig:` tag so that envconfig will look for a non-prefixed env var.
type Config struct { type Config struct {
// Configuration for drone-helm itself // Configuration for drone-helm itself
Command string `envconfig:"HELM_COMMAND"` // Helm command to run Command string `envconfig:"HELM_COMMAND"` // Helm command to run