app/history/helper.go

28 lines
349 B
Go
Raw Normal View History

2021-12-16 13:43:56 +00:00
package history
import "kumoly.io/kumoly/app/util"
func Error() *History {
h := getBase()
h.Type = ERROR
if !PROD {
h.Trace = util.Stack()
}
return h
}
func Info() *History {
h := getBase()
h.Type = INFO
return h
}
func getBase() *History {
mod, file := util.CallerMod(3)
h := &History{
Module: mod,
Caller: file,
}
return h
}