Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
  • Loading branch information
pierre-emmanuelJ committed Dec 15, 2023
1 parent 7fcdaa7 commit bb877ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions v3/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"log"
"os"
"sync"
)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit bb877ec

Please # to comment.