From the course: Learning Go

Unlock this course with a free trial

Join today to access over 24,200 courses taught by industry experts.

Create a Hello World application

Create a Hello World application - Go Tutorial

From the course: Learning Go

Create a Hello World application

- [Tutor] Once you've installed the Go development tools, you can create as many Go applications as you like. Each application should be in its own folder. I'm going to create a very simple, Hello World application. So I'll go to my Explorer window and right click and choose new folder. I'll give it a name of Hello, whatever name you give the folder will become the name of the resulting compiled application. The folder names should be all lowercase with no spaces. Now I'll create a source code file within that folder and I'll name it, main.go. There's some rules around this filename, the .go extension is required for all source code files. The name of the file before the file extension DOE could be anything you like, but once again, it should be all lowercase and no spaces. In order to serve as the startup code for an application, this file must be a member of a package called main. So I'll add that code at the top of the file.…

Contents