From c234b11cc220dd838f9e619dbb7db149869c1971 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 5 May 2021 12:49:24 -0700 Subject: [PATCH] Format --- server/app/main.go | 5 ++--- server/serverConfig.go | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/server/app/main.go b/server/app/main.go index de3231c..f25871e 100644 --- a/server/app/main.go +++ b/server/app/main.go @@ -86,15 +86,14 @@ func main() { // Graceful Shutdown c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - go func(){ + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + go func() { <-c acn.Close() server.Close() os.Exit(1) }() - server.Run(acn) for { time.Sleep(time.Second) diff --git a/server/serverConfig.go b/server/serverConfig.go index e9a7140..b305db3 100644 --- a/server/serverConfig.go +++ b/server/serverConfig.go @@ -20,20 +20,20 @@ type Reporting struct { // Config is a struct for storing basic server configuration type Config struct { - ConfigDir string `json:"-"` - FilePath string `json:"-"` - MaxBufferLines int `json:"maxBufferLines"` + ConfigDir string `json:"-"` + FilePath string `json:"-"` + MaxBufferLines int `json:"maxBufferLines"` - PublicKey ed25519.PublicKey `json:"publicKey"` - PrivateKey ed25519.PrivateKey `json:"privateKey"` + PublicKey ed25519.PublicKey `json:"publicKey"` + PrivateKey ed25519.PrivateKey `json:"privateKey"` TokenServerPublicKey ed25519.PublicKey `json:"tokenServerPublicKey"` TokenServerPrivateKey ed25519.PrivateKey `json:"tokenServerPrivateKey"` - TokenServiceK ristretto255.Scalar `json:"tokenServiceK"` + TokenServiceK ristretto255.Scalar `json:"tokenServiceK"` - ServerReporting Reporting `json:"serverReporting"` - AutoStart bool `json:"autostart"` + ServerReporting Reporting `json:"serverReporting"` + AutoStart bool `json:"autostart"` } // Identity returns an encapsulation of the servers keys