Skip to content

leomirandadev/go-learning-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the guide of how to learn Golang

Install golang: GOLANG OFFICIAL

First, you should know the basic characteristics of go.

Go is compiled. If you need test your application before the build you can use:

  $ go run nameOfMainFile.go

For basic build you can use:

  $ go build nameOfMainFile.go

The main file always must have a main function like

  package main // this is the name of package

  func main(){ // func is the prefix of every function on go
    // this is the main function
  }

Packages is normally separated by directories and the functions are share with all the files. Like:

  project
    └── main.go
    └── anotherFile.go

if your main file has the function called "calc" you can access this function on anotherFile.go using:

  // It's anotherFile.go
  package main // this is the name of package

  func anotherFunction(){
    calc() // 
  }

PRACTICAL EXAMPLES OF THE BASE

USING DAY BY DAY

MORE

About

This is a fast guide to learn Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages