Let's say I have the following byte string which represents some JSON packet:
data := []byte(`{
"Id" : 1,
"Name": "John Doe",
"Occupation": "gardener"
}`)
I'm wondering, is there a way to create this JSON packet dynamically, e.g.,
var NAME = "John Doe"
var OCCUPATION = "gardener"
data := []byte(`{
"Id" : 1,
"Name": {{ NAME }},
"Occupation": {{ OCCUPATION }}
}`)