fixing some bugs

This commit is contained in:
Andrew Davidson 2015-05-09 20:50:07 -04:00
parent 9223bee84c
commit 3ec4b4a790

View file

@ -85,16 +85,16 @@ func load (dataset DataMap, date string, str string, num int) ( DataMap ) {
func main() {
// Begin Arguments
sourceFile := flag.String("-source", "/var/log/spam.log", "The path to the spam log")
outfile := flag.String("-out", "data.js", "The path to the file you want to output.")
hamColor := flag.String("-hamcolor","rgba(80,220,80,1)","The color of the ham graph.")
hamFill := flag.String("-hamfill","rgba(80,220,80,0.2)","The fill color of the ham graph.")
quarantineColor := flag.String("-quarantinecolor","rgba(220,80,80,1)","The line color of the quarantine graph.")
quarantineFill := flag.String("-quarantinefill","rgba(220,80,80,0.2)","The fill color of the quarantine graph.")
noqueueColor := flag.String("-noqueuecolor","rgba(220,150,80,1)","The line color of the noqueue graph.")
noqueueFill := flag.String("-noqueuefill","rgba(220,150,80,0.2)","The fill color of the noqueue graph.")
pregreetColor := flag.String("-pregreetcolor","rgba(220,200,80,1)","The line color of the pregreet graph.")
pregreetFill := flag.String("-pregreetfill","rgba(220,200,80,0.2)","The fill color of the pregreet graph.")
sourceFile := flag.String("source", "/var/log/spam.log", "The path to the spam log")
outfile := flag.String("out", "data.js", "The path to the file you want to output.")
hamColor := flag.String("hamcolor","rgba(80,220,80,1)","The color of the ham graph.")
hamFill := flag.String("hamfill","rgba(80,220,80,0.2)","The fill color of the ham graph.")
quarantineColor := flag.String("quarantinecolor","rgba(220,80,80,1)","The line color of the quarantine graph.")
quarantineFill := flag.String("quarantinefill","rgba(220,80,80,0.2)","The fill color of the quarantine graph.")
noqueueColor := flag.String("noqueuecolor","rgba(220,150,80,1)","The line color of the noqueue graph.")
noqueueFill := flag.String("noqueuefill","rgba(220,150,80,0.2)","The fill color of the noqueue graph.")
pregreetColor := flag.String("pregreetcolor","rgba(220,200,80,1)","The line color of the pregreet graph.")
pregreetFill := flag.String("pregreetfill","rgba(220,200,80,0.2)","The fill color of the pregreet graph.")
flag.Parse()
// End Arguments
@ -105,8 +105,8 @@ func main() {
} // if err != nil
// Start semi-constants
aWeekAgo := time.Now().AddDate(0,0,-7)
aMonthAgo := time.Now().AddDate(0,0,-30)
aWeekAgo := time.Now().AddDate(0,0,-8)
aMonthAgo := time.Now().AddDate(0,0,-31)
// End semi-constants
// Start temporary maps