diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-05-13 16:04:19 -0700 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2022-06-18 14:03:49 -0400 |
| commit | c5fc7b8bad34f649b7a7198c2660b5d6decef8e1 (patch) | |
| tree | 123b456f6b2ac2d5d7ebfb0ae1f85a92608730b1 /data | |
| parent | 07eaff9deba17190317f5eccf3334739473a0a06 (diff) | |
Remove BoltDB support
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data')
| -rw-r--r-- | data/datasource.go | 4 | ||||
| -rw-r--r-- | data/datasource_boltdb.go | 32 |
2 files changed, 1 insertions, 35 deletions
diff --git a/data/datasource.go b/data/datasource.go index a28a66f7..a8ce5e74 100644 --- a/data/datasource.go +++ b/data/datasource.go @@ -42,8 +42,6 @@ func (d *Data) registerReaders() { d.sourceReaders["aws+smp"] = readAWSSMP d.sourceReaders["aws+sm"] = readAWSSecretsManager - // Deprecated: don't use - d.sourceReaders["boltdb"] = readBoltDB d.sourceReaders["consul"] = readConsul d.sourceReaders["consul+http"] = readConsul d.sourceReaders["consul+https"] = readConsul @@ -148,7 +146,7 @@ type Source struct { fs afero.Fs // used for file: URLs, nil otherwise hc *http.Client // used for http[s]: URLs, nil otherwise vc *vault.Vault // used for vault: URLs, nil otherwise - kv *libkv.LibKV // used for consul:, etcd:, zookeeper: & boltdb: URLs, nil otherwise + kv *libkv.LibKV // used for consul:, etcd:, zookeeper: URLs, nil otherwise asmpg awssmpGetter // used for aws+smp:, nil otherwise awsSecretsManager awsSecretsManagerGetter // used for aws+sm, nil otherwise mediaType string diff --git a/data/datasource_boltdb.go b/data/datasource_boltdb.go deleted file mode 100644 index 63be1e64..00000000 --- a/data/datasource_boltdb.go +++ /dev/null @@ -1,32 +0,0 @@ -package data - -import ( - "context" - - "github.com/hairyhenderson/gomplate/v3/internal/deprecated" - "github.com/hairyhenderson/gomplate/v3/libkv" - "github.com/pkg/errors" -) - -// Deprecated: don't use -func readBoltDB(ctx context.Context, source *Source, args ...string) (data []byte, err error) { - deprecated.WarnDeprecated(ctx, "boltdb support is deprecated and will be removed in a future major version of gomplate") - if source.kv == nil { - source.kv, err = libkv.NewBoltDB(source.URL) - if err != nil { - return nil, err - } - } - - if len(args) != 1 { - return nil, errors.New("missing key") - } - p := args[0] - - data, err = source.kv.Read(p) - if err != nil { - return nil, err - } - - return data, nil -} |
