Skip to content

Commit

Permalink
changed csv data pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed May 12, 2020
1 parent be0ac64 commit da7570a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ func (p *Peng) ExportToCsv() {
currTime := time.Now().Local().String()
writer := csv.NewWriter(file)
var csvData = [][]string{
{currTime, "client", fmt.Sprintf("%f", p.ClientTraffic.EntropyTotal())},
{currTime, "server", fmt.Sprintf("%f", p.ServerTraffic.EntropyTotal())},
{currTime, fmt.Sprintf("%f", p.ClientTraffic.EntropyTotal()), fmt.Sprintf("%f", p.ServerTraffic.EntropyTotal())},
}
// 3. Write all the records
err = writer.WriteAll(csvData) // returns error
Expand Down

0 comments on commit da7570a

Please sign in to comment.