@@ -12,7 +12,7 @@ import (
1212)
1313
1414type (
15- // Logger is a interface that output log .
15+ // Logger is a logging interface .
1616 Logger interface {
1717 Progressf (format string , args ... interface {})
1818 Printf (format string , args ... interface {})
@@ -33,26 +33,26 @@ var (
3333 colorableStderr = colorable .NewColorableStderr ()
3434)
3535
36- // NewLogger returns a logger
36+ // NewLogger returns a logger.
3737func NewLogger () Logger {
3838 return & logger {
3939 w : ioutil .Discard ,
4040 }
4141}
4242
43- // NewFileLogger returns a logger with file writer
43+ // NewFileLogger returns a logger with file writer.
4444func NewFileLogger () Logger {
4545 return & logger {
4646 w : cronowriter .MustNew (path .Log ()),
4747 }
4848}
4949
50- // Progressf is a function to standard output progressive .
50+ // Progressf is a function that writes string to standard output in a fixed position .
5151func (l * logger ) Progressf (format string , args ... interface {}) {
5252 fmt .Fprintf (colorableStdout , "\r \033 [K%s" , color .GreenString (format , args ... ))
5353}
5454
55- // Printf is a function to standard output.
55+ // Printf is a function that writes string to standard output.
5656func (l * logger ) Printf (format string , args ... interface {}) {
5757 fmt .Fprintln (colorableStdout , fmt .Sprintf (format , args ... ))
5858}
0 commit comments