Toolz provides collection of different tools
Get The Library
go get github.com/avid/toolz
log.HandyFile
HandyFile is a simple wrapper for os.File providing some additional methods and sync wrtites.
file, err = writer.NewHandyFile("path_to_file")
HandyFile.Reload()
closes and opens os.File. It is useful with system logrotate, ex. by signal
HandyFile.Rotate()
renames current file with date_time
suffix and opens new with name provided on init.