1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-15 17:46:55 +00:00

convert final touches

This commit is contained in:
Kane York 2016-06-02 09:04:46 -07:00
parent cdcb7fb079
commit 89e6298583

View file

@ -42,10 +42,6 @@ type backendInfo struct {
var Backend *backendInfo
var backendSharedKey [32]byte
var lastBackendSuccess map[string]time.Time
func setupBackend(config *ConfigFile) *backendInfo {
b := new(backendInfo)
Backend = b
@ -60,7 +56,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
b.postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats)
epochTime := time.Unix(0, 0).UTC()
lastBackendSuccess = map[string]time.Time{
lastBackendSuccess := map[string]time.Time{
bPathAnnounceStartup: epochTime,
bPathAddTopic: epochTime,
bPathAggStats: epochTime,
@ -72,7 +68,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
copy(theirPublic[:], config.BackendPublicKey)
copy(ourPrivate[:], config.OurPrivateKey)
box.Precompute(&backendSharedKey, &theirPublic, &ourPrivate)
box.Precompute(&b.sharedKey, &theirPublic, &ourPrivate)
return b
}