Error while installing go on jenkins container – no go named Go 1.8 found

Error: no go named Go 1.8 found

I am facing this error while installing go plugin on jenkins/jenkins docker container through pipeline.

I used following pipeline code to install go plugin. Any ideas are welcome.
I tried other go versions also. Like 1.6, 1.9, still faced same issue.

stages {
          stage('Install Go') {
            steps {
                script {
                   def root = tool name: 'Go 1.7.6', type: 'go'
                   // Export environment variables pointing to the directory where Go was installed
                   withEnv(["GOROOT=${root}", "PATH+GO=${root}/bin"]) {
                   sh 'go version'

Source: StackOverflow