This approach is working well so far 
query := JSONUpsert{
Set: jsonMap,
}
b, err := json.Marshal(query)
if err != nil {
fmt.Println(err)
}
mu := &api.Mutation{
CommitNow: true,
SetJson: b,
}
req := &api.Request{
Query: fmt.Sprintf("query { v as var(func: eq(containerId, %s))}", key),
Mutations: []*api.Mutation{mu},
CommitNow: true,
}
response, err := s.DClient.NewTxn().Do(context.Background(), req)