Skip to content

J0rgeSerran0/golang-introduction-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Introduction Samples

Introduction and basic samples to practice and learn with Go

This repo has been created to help you to adopt Go and learn about it

Spanish - (Blog) Introducción a Go o Golang

Features of Go

Some of the most important features of Go are:

  • manages the memory for us
  • has been created thinking in the concurrency paradigm
  • compile to standalone binaries (not interpreted)
  • is fast in compilation times (giving us a quick feedback about errors or problems)
  • is simple to use
  • is strongly typed
  • is statically typed

First steps

If you have not installed Go on your computer, please... follow this steps

  1. Download Go
  2. Install it!
  3. Open your terminal or command prompt and write
go version

You should see information about Go and the version installed on your computer

Go file extension

All your Go files should have the extension .go

For example:

main.go

Basic Go commands

There are a lot of commands inside of Go

The basic commands that you will be use for sure are:

  • To execute your code:
go run main.go
  • To build your code in a standalone binary:
go build

Write you own Go programs!

Use some editor to create or modify the samples

The most important here is to use the tool that you want and to be comfortable with it

One important thing here

If you want to use Visual Code as me, don't forget install the Go for Visual Studio Code extension This extension for Visual Studio Code is not necessary but helps

But if you want to run your Go code without install anything... you can!

You can test your Go code in the official web site, or in Go Playground directly

Samples

Complete source code here src

In Go Playground:

Resources

Releases

No releases published

Packages

No packages published

Languages