This repository has been archived on 2025-07-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
hacknotts23/feedprocessor/config/config.go
AKP 70d0fdc809
Alter 8 files
Update `config.go`
Add `feed.go`
Add `messageTypes.go`
Add `process.go`
Update `main.go`
Update `structures.go`
Update `go.mod`
Update `go.sum`
2023-02-12 05:57:10 +00:00

21 lines
415 B
Go

package config
import (
"github.com/rs/zerolog/log"
"os"
)
var (
RedisHostname = os.Getenv("TRAINS_REDIS_HOST")
RedisUsername = os.Getenv("TRAINS_REDIS_USER")
RedisPassword = os.Getenv("TRAINS_REDIS_PASS")
NationalRailUsername = os.Getenv("TRAINS_NR_USER")
NationalRailPassword = os.Getenv("TRAINS_NR_PASS")
)
func init() {
if len(RedisHostname) == 0 {
log.Fatal().Msg("empty TRAINS_REDIS_HOST")
}
}