Make env variables required

This commit is contained in:
Marc Di Luzio 2020-06-13 10:42:59 +01:00
parent 51030ac162
commit ccb34d4452
3 changed files with 8 additions and 5 deletions

View file

@ -106,6 +106,9 @@ func (s *Server) Initialise(fillWorld bool) (err error) {
s.sync.Add(1)
// Connect to the accountant
if len(accountantAddress) == 0 {
log.Fatal("must set ACCOUNTANT_ADDRESS")
}
log.Printf("Dialing accountant on %s\n", accountantAddress)
s.clientConn, err = grpc.Dial(accountantAddress, grpc.WithInsecure())
if err != nil {