From cebff8e1d28a68a72f664ecaca5a0642a31f66b6 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Tue, 25 Feb 2020 12:48:57 -0800 Subject: [PATCH] Adding initial dot which matches the format for the return of the filepath.Ext() funciton. --- realis.go | 2 +- util_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/realis.go b/realis.go index 5b5ee05..fe4c5e8 100644 --- a/realis.go +++ b/realis.go @@ -321,7 +321,7 @@ func NewRealisClient(options ...ClientOption) (Realis, error) { config.timeoutms = 10000 config.backoff = defaultBackoff config.logger = &LevelLogger{logger: log.New(os.Stdout, "realis: ", log.Ltime|log.Ldate|log.LUTC)} - config.certExtensions = map[string]struct{}{"crt": {}, "pem": {}, "key": {}} + config.certExtensions = map[string]struct{}{".crt": {}, ".pem": {}, ".key": {}} // Save options to recreate client if a connection error happens config.options = options diff --git a/util_test.go b/util_test.go index 1b374a3..f177bbf 100644 --- a/util_test.go +++ b/util_test.go @@ -102,7 +102,7 @@ func TestCurrentBatchCalculator(t *testing.T) { } func TestCertPoolCreator(t *testing.T) { - extensions := map[string]struct{}{"key": {}, "pem": {}, "crt": {}} + extensions := map[string]struct{}{".pem": {}} _, err := createCertPool("examples/certs", extensions) assert.NoError(t, err)