From 2e52bca992098ac13082bd1a1ed0af0ed1068229 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Oct 2023 15:04:04 -0400 Subject: [PATCH] refactor to simplify --- akeyless/akeyless_auth.go => main.go | 6 +++--- akeyless/akeyless_auth_test.go => main_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename akeyless/akeyless_auth.go => main.go (90%) rename akeyless/akeyless_auth_test.go => main_test.go (98%) diff --git a/akeyless/akeyless_auth.go b/main.go similarity index 90% rename from akeyless/akeyless_auth.go rename to main.go index 5c170cf..29984b2 100644 --- a/akeyless/akeyless_auth.go +++ b/main.go @@ -1,4 +1,4 @@ -package akeyless +package sheller import ( "errors" @@ -15,10 +15,10 @@ func GetTokenFromAkeylessCommandLine() (string, error) { } cmdParts := strings.Fields(cmdStr) - + // Check if the path points to an executable file if _, err := os.Stat(cmdParts[0]); os.IsNotExist(err) { - return "", errors.New("The path does not point to an executable file") + return "", errors.New("the path does not point to an executable file") } cmd := exec.Command(cmdParts[0], cmdParts[1:]...) diff --git a/akeyless/akeyless_auth_test.go b/main_test.go similarity index 98% rename from akeyless/akeyless_auth_test.go rename to main_test.go index 158ce9f..9ec2903 100644 --- a/akeyless/akeyless_auth_test.go +++ b/main_test.go @@ -1,4 +1,4 @@ -package akeyless +package sheller import ( "os"