Where to add path in /etc/profile

The if and the fi form blocks, just leave them as they are.

You can just add the line

PATH=/usr/local/go/bin:$PATH

as the last line of /etc/profile.

But do you really want to make Go available for everybody on your Ubuntu(?) system? It should be enough to just make Go available for you. Edit $HOME/.profile for this and append the above line to this file.