mirror of https://gitea.com/webb/interrupt
Good practices
This commit is contained in:
parent
9d297fe792
commit
996e1ebb01
14
cfg.go
14
cfg.go
|
@ -6,15 +6,15 @@ import (
|
|||
)
|
||||
|
||||
func getUploadKey() (string, error) {
|
||||
PXL_KEY := os.Getenv("PXL_KEY")
|
||||
if PXL_KEY != "" {
|
||||
return PXL_KEY, nil
|
||||
readKey := os.Getenv("PXL_KEY")
|
||||
if readKey != "" {
|
||||
return readKey, nil
|
||||
}
|
||||
|
||||
MIRAGE_KEY := os.Getenv("MIRAGE_KEY")
|
||||
if MIRAGE_KEY != "" {
|
||||
return MIRAGE_KEY, nil
|
||||
readKey = os.Getenv("MIRAGE_KEY")
|
||||
if readKey != "" {
|
||||
return readKey, nil
|
||||
}
|
||||
|
||||
return "", errors.New("Upload key not set as environment variable!")
|
||||
return "", errors.New("upload key not set as environment variable")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue