go(golang) error giving go install - Unexpected directory layout command

Asked

Viewed 117 times

0

I’m new to go(golang) I’m trying to start an application but without success, it returns me the following error when giving the go install command:

unexpected directory layout:
        import path: github.com/gorilla/handlers
        root: D:\BitBucketERN\GO\src
        dir: D:\BitBucketERN\GO\src\bitbucket.com\ernetworkdev\ern-admin-cadastro-api\vendor\github.com\gorilla\handlers
        expand root: D:\BitBucketERN\GO\src
        expand dir: D:\BitBucketERN\GO\src\bitbucket.com\ernetworkdev\ern-admin-cadastro-api\vendor\github.com\gorilla\handlers
        separator: \

my version :

 go1.10 windows/amd64
  • didn’t work out...

  • What is the file structure?

  • the GOPATH "D: Bitbucketern GO" and GORROT "D: GO" and the structure of the "D: Bitbucketern GO src bitbucket.com ernetworkdev ern-admin-cadastro-api project"

  • try to add copy the github.com/gorilla/handlers for D:\BitBucketERN\GO\src\github.com\gorilla\handlers

  • was already copied in this directory

  • Try copying to D:\BitBucketERN\GO\src\bitbucket.com\ernetworkdev\ern-admin-cadastro-api\vendor\github.com\gorilla\handlers then. This error is directly related to the location of the files, you just need to find the right configuration. Fountain

Show 1 more comment

1 answer

1


Set the environment variables GOROOT being the folder where you performed the installation, in my case I installed directly in C:/Go, already the GOPATH where you will program effectively.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.