https://github.com/lestoni/go-logtick
git log output parser
https://github.com/lestoni/go-logtick
git gitlog log parser
Last synced: 9 months ago
JSON representation
git log output parser
- Host: GitHub
- URL: https://github.com/lestoni/go-logtick
- Owner: lestoni
- License: mit
- Created: 2018-11-22T07:10:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T09:44:57.000Z (over 7 years ago)
- Last Synced: 2025-05-07T18:03:22.505Z (11 months ago)
- Topics: git, gitlog, log, parser
- Language: Go
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logtick
[](https://godoc.org/github.com/lestoni/go-logtick) [](https://goreportcard.com/report/github.com/lestoni/go-logtick)
Parse a `git log -1 -p --stat --pretty=fuller` .I Find it the log output simple and detailed enough.
Originally created for [go-logtick-http](https://github.com/lestoni/go-logtick-http)
## Install
```sh
$ go get github.com/lestoni/go-logtick
```
## Usage
```
func main(){
log, err := ioutil.ReadFile("testdata/git.log")
if err != nil {
panic(err)
}
content := fmt.Sprintf("%s", log)
output, err := logtick.Parse(content)
if err != nil {
panic(err)
}
out, err := output.ToJSON()
if err != nil {
panic(err)
}
fmt.Printf("%+v", output)
}
```
## Testing
Test with Code Coverage
```
$ go test -cover
```