Golang dgraph client connection error

I see you commented out the dgo.DialCloud endpoint. Did that not work for you?

You could try setting Authorization to just the key (not prefixed with "Bearer ") or use the Dg-Auth instead of Authorization.