Skip to content

arthurfalcao/learning-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

learning-go

Instalation

  • Download: https://golang.org/dl/
  • Extract: sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
  • Add to the path: open sudo vim /etc/profile and add export PATH=$PATH:/usr/local/go/bin

Run

  go run main.go

commands

  • reflect.TypeOf(variable) retorna o tipo
  • array := []string{"string"} é um slice, que pode modificar o tamanho do array
  • var array = [4]string é um array, com tamanho fixo
  • len(array) retorna o tamanho do array
  • cap(array) retorna a capaciadade do array
  • array = append(array, "string") adiciona um novo item ao array e retorna

About

Curso de Go @ Alura

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy