From 441374c0d471d7b1a62396fc2d2dd17afce0bf4c Mon Sep 17 00:00:00 2001 From: NI Date: Mon, 17 Aug 2020 12:56:03 +0800 Subject: [PATCH] Fix typo: Enviroment -> Environment --- README.md | 6 +++--- application/configuration/string.go | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6aad5cb..8fb0ff0 100644 --- a/README.md +++ b/README.md @@ -227,9 +227,9 @@ Here is all the options of a configuration file: // - "file://": Load Meta value from given file. // Example: file:///home/user/.ssh/private_key // (The file path is /home/user/.ssh/private_key) - // - "enviroment://": Load Meta value from an Enviroment Variable. - // Example: enviroment://PRIVATE_KEY_DATA - // (The name of the target enviroment variable is + // - "environment://": Load Meta value from an Environment Variable. + // Example: environment://PRIVATE_KEY_DATA + // (The name of the target environment variable is // PRIVATE_KEY_DATA) // // All data in Meta is loaded during start up, and will not be updated diff --git a/application/configuration/string.go b/application/configuration/string.go index 2453744..7743b16 100644 --- a/application/configuration/string.go +++ b/application/configuration/string.go @@ -47,7 +47,9 @@ func (s String) Parse() (string, error) { return string(fData), nil - case "enviroment": + case "enviroment": // You see what I did there. Remove this a later + fallthrough + case "environment": return os.Getenv(ss[sSchemeLeadEnd:]), nil case "literal":