Open a terminal, Terminal > New Terminal, then run the command go mod init sample-app to initialize your sample Go app.Ĭopy the following code into the main.go file.Ĭreate a break point on line 7 by left clicking to the left of the numbered line. To open the folder, click the Explorer icon in the Activity Bar then click Open Folder.Ĭlick New Folder in the Explorer panel, then Create the root director for your sample Go application named sample-appĬlick New File in the Explorer panel, then name the file main.go In Visual Studio Code, open the folder where you'll create the root directory of your Go application. Wait for the Go tools to finish updating.ĥ. When prompted, select all the available Go tools then click OK. Search for Go: Install/Update tools then run the command from the pallet Or use the keyboard shortcut (Ctrl+Shift+P) In Visual Studio Code, open Command Palette's Help > Show All Commands. Search for the Go extension, then select install. In Visual Studio Code, bring up the Extensions view by clicking on the Extensions icon in the Activity Bar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |