From d275ecf48deb2b42b1fc740e511f9f1a9d0751b1 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Sat, 12 Mar 2016 03:23:12 +0100 Subject: [PATCH] init nodes values --- models/nodes.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/models/nodes.go b/models/nodes.go index f042cf8..56672cd 100644 --- a/models/nodes.go +++ b/models/nodes.go @@ -2,12 +2,13 @@ package models import ( "encoding/json" - "github.com/ffdo/node-informant/gluon-collector/data" "io/ioutil" "log" "os" "sync" "time" + + "github.com/ffdo/node-informant/gluon-collector/data" ) // Node struct @@ -50,7 +51,10 @@ func (nodes *Nodes) Get(nodeID string) *Node { if node == nil { node = &Node{ - Firstseen: now, + Firstseen: now, + Nodeinfo: &data.NodeInfo{}, + Statistics: &data.StatisticsStruct{}, + Neighbours: &data.NeighbourStruct{}, } nodes.List[nodeID] = node }