I have no idea why this is happening, having read parser.go the comment should be consumed before the rest, but using:
package main
import "github.com/gurkankaymak/hocon"
func main() {
_, err := hocon.ParseResource("test.conf")
if err != nil {
panic(err)
}
}
with a test.conf of
# this is a test
name: value
# another test
name2: value2 #this value is commented
I get
$ go version
go version go1.19.1 linux/amd64
$ ./play
panic: missing comma! at: 5:15, values should have comma or ASCII newline ('\n') between them
goroutine 1 [running]:
main.main()
/home/peter/play/main.go:8 +0x45
* HOCON allows comments on the same line as a key or value, while properties files only recognize comment characters if they occur as the first character on the line
I have no idea why this is happening, having read parser.go the comment should be consumed before the rest, but using:
with a test.conf of
I get
According to lightbend this should work: