knoa, dealing with unstructured data

43 views
Skip to first unread message

Iván Corrales Solera

unread,
Aug 7, 2023, 5:15:20 PM8/7/23
to Golang-China
I'm so happy to announce the very first release of knoa

The goal of knoa is to provide a handy way to deal with unstructured data in go

The below piece of code shows an example (You could find more examples here

type Person struct {
Firstname string `structs:"firstname"`
Age int `structs:"age"`
Siblings []Person `structs:"siblings,omitempty"`
}

func main(){
k := knoa.Map().Set("firstname", "John", "age", 20)
k.Set("siblings", []Person{
{
Firstname: "Tim",
Age: 29,
},
{
Firstname: "Bob",
Age: 40,
},
})

k.Set("age", 23, "siblings[1].age", 39)

var person Person
k.To(&person)
}

I am working hard to provide a ready-for-production release, but any feedback or suggestion will be appreciated in the meantime!

Thank you so much in advance!

Reply all
Reply to author
Forward
0 new messages