Implemented MAC1/2 calculation

This commit is contained in:
Mathias Hall-Andersen
2017-06-27 17:33:06 +02:00
parent eb75ff430d
commit 8236f3afa2
13 changed files with 454 additions and 85 deletions
+35
View File
@@ -0,0 +1,35 @@
package main
import (
"log"
"os"
)
const (
LogLevelError = iota
LogLevelInfo
LogLevelDebug
)
type Logger struct {
Debug *log.Logger
Info *log.Logger
Error *log.Logger
}
func NewLogger() *Logger {
logger := new(Logger)
logger.Debug = log.New(os.Stdout,
"DEBUG: ",
log.Ldate|log.Ltime|log.Lshortfile,
)
logger.Info = log.New(os.Stdout,
"INFO: ",
log.Ldate|log.Ltime|log.Lshortfile,
)
logger.Error = log.New(os.Stdout,
"ERROR: ",
log.Ldate|log.Ltime|log.Lshortfile,
)
return logger
}