How to set NodeName using consul api

Here I see option only to get NodeName ,
Could you tell me how to set the NodeName using the api

Hi @hhemanathan,

The node name can be configured when running consul agent by specifying the -node CLI flag, or in the agent’s configuration file using the node_name configuration option.

Thanks @blake, I am doing proxy consul registartion via golang consul api… Is it possible to set the nodename while doing consul registration …
Basically I want to set the nodename as the nodename of the service for which I am doing proxy consul registration