Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: aligned name of DRIVR_API_TOKEN (Issue #30) and replaced spaces by tabs #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cert/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func WriteToPEMFile(keyType PEMType, keyBytes []byte, filename string) error {
}

var _, err = os.Stat(filename)
if err == nil {
if err != nil {
IliaOpiakin marked this conversation as resolved.
Show resolved Hide resolved
logrus.WithField("outfile", filename).Error("file already exists")
return fmt.Errorf("file %s already exists", filename)
}
Expand Down
12 changes: 6 additions & 6 deletions cmd/drivr-certificate-client/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
}
)

const drivrAPIKeyEnv = "DRIVR_API_KEY"
const drivrAPIKeyEnv = "DRIVR_API_TOKEN"

var apikey string

Expand All @@ -73,11 +73,11 @@ func getAPIKey() string {
}

func getAPIUrl(ctx *cli.Context) string {
apiURL := ctx.String(drivrAPIURLFlag.Name)
if !strings.HasPrefix(apiURL, "http") {
return fmt.Sprintf("https://%s", apiURL)
}
return apiURL
apiURL := ctx.String(drivrAPIURLFlag.Name)
if !strings.HasPrefix(apiURL, "http") {
return fmt.Sprintf("https://%s", apiURL)
}
return apiURL
}

func combinedCheckFuncs(checks ...func(*cli.Context) error) func(*cli.Context) error {
Expand Down
Loading