How to create a module for a specific folder?

Asked

Viewed 43 times

2

opa, all right? I tried to create a module in Go language in visual studio. The module refers to a folder called "1 - Packages". but when I write the code only appears this. I’m starting in programming and do not understand much.

PS C:\Users\arthu\OneDrive\Documentos\5. Programação\Visual Studio\Golang> cd 1\ -\ Pacotes/
Set-Location : Não é possível localizar um parâmetro posicional que aceite o argumento '-\'.
No linha:1 caractere:1
+ cd 1\ -\ Pacotes/   
+ ~~~~~~~~~~~~~~~~~   
    + CategoryInfo          : InvalidArgument: (:) [Set-Location], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
 
PS C:\Users\arthu\OneDrive\Documentos\5. Programação\Visual Studio\Golang> 
  • It would help if you put your code and the structure of your project into the question. Another piece of information you’d better clarify is whether your project was initialized as Go Module or not, because if it wasn’t Go will only be able to import the dependencies if your project is within the Go Path

1 answer

0

Friend, the error you gave yourself is related to the powershell or cmd and not the GO language.

Problem refers to trying to use cd command.

It is interpreting - in "cd 1 - Packages/" as a parameter for the cd command.

If you try to enter the folder using:

cd '.\1 - Pacotes\'

It will work, hugs.

Browser other questions tagged

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