summaryrefslogtreecommitdiff
path: root/config.FormatENV.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.FormatENV.go')
-rw-r--r--config.FormatENV.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/config.FormatENV.go b/config.FormatENV.go
deleted file mode 100644
index 1775ad6..0000000
--- a/config.FormatENV.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package config
-
-/*
-func formatENV() (string, error) {
- if configPB == nil {
- return "", errors.New("configPB not initialized")
- }
-
- var out string
- uniques := make(map[string]*Config) // check to make sure there are no duplicate entries
-
- for c := range configPB.IterAll() {
- key := strings.ToLower(c.Key)
- if len(strings.Fields(key)) != 1 {
- log.Info("dropping invalid key = ", c.Key, "value =", c.Value)
- continue
- }
- found := findByLower(key)
- if found == nil {
- log.Info("findByKey() got nil for key:", key)
- }
- // todo: warn about duplicates?
- uniques[key] = found
- }
-
- for key, c := range uniques {
- if c == nil {
- log.Info("key has nil c", key)
- continue
- }
- line := fmt.Sprintf("%s=%s", c.Key, c.Value)
- out += line + "\n"
- }
- return out, nil
-}
-
-func findByLower(lookingFor string) *Config {
- for c := range configPB.IterAll() {
- if strings.ToLower(c.Key) == strings.ToLower(lookingFor) {
- return c
- }
- }
- return nil
-}
-*/