1
0
Fork 0

Cleanup duplicated code

This commit is contained in:
Gregory Eremin 2015-10-25 14:35:39 +03:00
parent e098c2d7ea
commit 3918b26043
1 changed files with 1 additions and 8 deletions

View File

@ -34,14 +34,7 @@ func NewLogger(out io.Writer, interval time.Duration) *Logger {
}
func NewStdoutLogger(interval time.Duration) *Logger {
l := &Logger{
out: os.Stdout,
interval: interval,
stats: make(map[string]*loggerStats),
}
go l.printWithInterval()
return l
return NewLogger(os.Stdout, interval)
}
func (l *Logger) Add(name string, dur time.Duration) {