How to concatenate variable value into the byte key values ?
type Result struct {
SummaryID int `json:"summaryid"`
Description string `json:"description"`
}
byt := []byte(`
{
"fields": {
"project":
{
"key": "DC"
},
"summary": "Test" + Result.SummaryID,
"description": Result.Description,
"issuetype": {
"name": "Bug"
}
}
}`)
Note: values of Result.SummaryID
and Result.Description
return from the db.Query()
and rows.Scan()
.