https://github.com/jdevelop/go-hocon
HOCON parser for Golang
https://github.com/jdevelop/go-hocon
golang golang-package hocon
Last synced: 3 months ago
JSON representation
HOCON parser for Golang
- Host: GitHub
- URL: https://github.com/jdevelop/go-hocon
- Owner: jdevelop
- Created: 2017-07-07T11:20:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T17:42:08.000Z (almost 9 years ago)
- Last Synced: 2025-12-18T16:11:38.536Z (6 months ago)
- Topics: golang, golang-package, hocon
- Language: Go
- Size: 32.2 KB
- Stars: 17
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HOCON configuration for Golang :: [](https://travis-ci.org/jdevelop/go-hocon)
The basic implementation of [HOCON](https://github.com/typesafehub/config/blob/master/HOCON.md) for Golang, using [ANTLR](https://github.com/antlr/antlr4) grammar derived from [JSON](https://github.com/antlr/grammars-v4/blob/master/json/JSON.g4).
### Usage example
```Go
package main
import (
"github.com/jdevelop/go-hocon"
"fmt"
)
func main() {
res, _ := hocon.ParseHoconFile("reference.conf")
res.GetString("akka.persistence.view.auto-update")
res.GetString("akka.persistence.view.auto-update-replay-max")
res.GetInt("akka.persistence.view.auto-update-replay-min")
obj := res.GetObject("akka.persistence.snapshot-store.proxy")
obj.GetString("init-timeout")
}
```