logging-for-otus
Implementing a small logger for Otus on Go.
Installation
Run the following command from you terminal:
go get github.com/koind/logging-for-otus
Usage
Package usage example.
package main
import (
logging "github.com/koind/logging-for-otus"
"bytes"
)
func main() {
var b bytes.Buffer
hwAccepted := logging.NewHwAccepted(1, 25)
logging.LogOtusEvent(hwAccepted, &b)
println(b.String()) // 2019-06-23 accepted 1 25
}
Available Methods
The following methods are available:
koind/logging-for-otus
NewHwAccepted(id int, grade int) *HwAccepted
NewHwSubmitted(id int, code string, comment string) *HwSubmitted
LogOtusEvent(e OtusEvent, w io.Writer)
LogMessage() string
Tests
Run the following command from you terminal:
go test -v .