package main import ( "time" ) type RawData struct { IpSrc string `json:ip_src` IpDst string `json:ip_dst` AsSrc int `json:as_src` AsDst int `json:as_dst` PortSrc int `json:port_src` PortDst int `json:port_dst` Packets int `json:packets` PktLenDist string `json:pkt_len_distrib` time time.Time } type cleanedData struct { ipbSrc string ipbDst string asSrc int asDst int portSrc int portDst int occurences int volume string time time.Time } func (cd *cleanedData) equals(other *cleanedData) bool { return cd.ipbSrc == other.ipbSrc && cd.ipbDst == other.ipbDst && cd.asSrc == other.asSrc && cd.asDst == other.asDst && cd.portSrc == other.portSrc && cd.portDst == other.portDst && cd.volume == other.volume && cd.time == other.time }