From e528485892f71e9cfe831b64aae28c11b6bf26e1 Mon Sep 17 00:00:00 2001 From: Simon Beck Date: Tue, 8 Feb 2022 12:56:33 +0100 Subject: [PATCH] Fix bug with lowercasing --- .vscode/launch.json | 17 +++++++++++++++++ util.go | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1ffb56d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}", + "env": {}, + "args": [] + } + ] +} diff --git a/util.go b/util.go index cbb6b0f..92cff52 100644 --- a/util.go +++ b/util.go @@ -30,7 +30,9 @@ func dnToConsul(dn string) (string, error) { rdns[i], rdns[j] = rdns[j], rdns[i] } - return strings.Join(rdns, "/"), nil + concattedPath := strings.Join(rdns, "/") + + return strings.ToLower(concattedPath), nil } func consulToDN(key string) (string, string, error) {