mirror of https://gitea.com/webb/interrupt
21 lines
311 B
Go
21 lines
311 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
)
|
|
|
|
func getUploadKey() (string, error) {
|
|
readKey := os.Getenv("PXL_KEY")
|
|
if readKey != "" {
|
|
return readKey, nil
|
|
}
|
|
|
|
readKey = os.Getenv("MIRAGE_KEY")
|
|
if readKey != "" {
|
|
return readKey, nil
|
|
}
|
|
|
|
return "", errors.New("upload key not set as environment variable")
|
|
}
|