Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Go and VisualCode

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am a newbie to Go and I am trying to find my way around especially when using it with Visual Code (which I barely used before). By typing (I work in mac), I can see that my is in:



However, I want to keep all my code inside , therefore when I stand up Visual Code I have created a workspace and added each project as a folder. Is this the right way to do it? Do I need to have my code in the same location as my ? Is there a good step by step guide on how to work with Go and Visual Code? Do I need to have a workspace per project?

Thank you

 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't write in Go, but use VS Code for another languages.

As you have discovered, VS Code automatically creates a project workspace when you open the root folder of a project. I've never found any need for having multiple folders in a workspace, and unless you have found a need to do so, you don't really need to do anything else.

You can find out more about VS Code workspaces here: https://code.visualstudio.com/docs/editor/workspaces
 
Saloon Keeper
Posts: 24541
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a quick check and it appears that a Go workspace is like an Eclipse workspace in that it can contain multiple projects rather than one project per workspace..

As a general rule, I'd setup the IDE to match the development environment rather than change the GOPATH.
 
Geane Norm
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you both, it helped a lot! Out of curiosity, when I rename the automatically created "unnamed workspace", can this be saved anywhere?  Does it have to be at a precise location?

Thank you
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic