Is it possible to write dynamic query in golang

To facilitate better answering of questions, if you have a question, please fill in the following info. Otherwise, please delete the template.

What I want to do

Dynamic Query value

name := "Ali"
q := `{
			all(func : anyofterm($name)){
				uid,
				name,
			}
		  }`

I’m want “uid” of a record. Is there is any way to get uid from response or any method
Please list the high level idea of what you want to do

What I did

q := `{
			all(func : anyofterm($name)){
				uid,
				name,
			}
		  }`

Please list the things you have tried.

Dgraph metadata

dgraph version

PASTE THE RESULTS OF dgraph version HERE.