From bb877ec97103c42359ab8372b8cb9b39d352fa4a Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:52:14 +0000 Subject: [PATCH] lint Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com> --- v3/credentials.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v3/credentials.go b/v3/credentials.go index 91635171b..ee475cc81 100644 --- a/v3/credentials.go +++ b/v3/credentials.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "log" "os" "sync" ) @@ -133,18 +134,20 @@ func Test() { // add custom injector creds.WithInjectors(func(ctx context.Context) (CredentialsValue, error) { - //custom + // custom return CredentialsValue{}, nil }) // add a predifined injector creds.WithInjectors(InjectorEnv) // reload it after added injectors. - creds.Retrieve(ctx) + if err := creds.Retrieve(ctx); err != nil { + log.Fatal(err) + } // create loaded creds from injector custom or not. _, _ = NewCredentials(ctx, func(ctx context.Context) (CredentialsValue, error) { - //custom + // custom return CredentialsValue{}, nil }, InjectorFile)