Simple helper which allows you to easily log function enter/exit lines.
go get github.com/chilts/logfn
package main
import "github.com/chilts/logfn"
func main() {
defer logfn.Exit(logfn.Enter("main"))
myFunc()
}
func myFunc() {
defer logfn.Exit(logfn.Enter("myFunc"))
}
Will output lines like:
2017/02/20 23:24:44 -> main
2017/02/20 23:24:44 -> myFunc
2017/02/20 23:24:45 <- myFunc
2017/02/20 23:24:45 <- main
By Andrew Chilton, @twitter.
For AppsAttic, @AppsAttic.
MIT.
(Ends)