Make ADLIN_COLLECTOR_SECRET optional
This commit is contained in:
parent
8cc03e7ef8
commit
54a3fe9192
@ -77,7 +77,7 @@ func main() {
|
|||||||
adlin.SharedSecret = v
|
adlin.SharedSecret = v
|
||||||
}
|
}
|
||||||
if v, exists := os.LookupEnv("ADLIN_COLLECTOR_SECRET"); !exists {
|
if v, exists := os.LookupEnv("ADLIN_COLLECTOR_SECRET"); !exists {
|
||||||
log.Fatal("Please define ADLIN_COLLECTOR_SECRET environment variable")
|
log.Println("Warning: Please define ADLIN_COLLECTOR_SECRET environment variable")
|
||||||
} else if t, err := base64.StdEncoding.DecodeString(v); err != nil {
|
} else if t, err := base64.StdEncoding.DecodeString(v); err != nil {
|
||||||
log.Fatal("Error reading ADLIN_COLLECTOR_SECRET variable:", err)
|
log.Fatal("Error reading ADLIN_COLLECTOR_SECRET variable:", err)
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user