By
Martin Elias Quintero Osorio
Manuela Castrillón Medina
Programming language created at Google
- Golang is open-source but backed up by a large corporation
- Many big companies used it for their projects (Google, Dropbox, Soundcloud, Docker, Cloudflare, BBC...)
- It’s fast (to learn, to develop in, to compile, to deploy, to run)
- Go is a modern language
- Golang is simple
- Good cross-platform support
- Go is safe
- Rapid development and growing community
- It’s concurrent
Lightweight thread of execution.
package main
import (
"fmt"
"time"
)
func say(s string) {
for i := 0; i < 5; i++ {
time.Sleep(100 * time.Millisecond)
fmt.Println(s)
}
}
func main() {
go say("world")
say("hello")
}
/*
world
hello
hello
world
world
hello
hello
world
world
hello
*/
Limits the number of operating system threads that can execute user-level Go code simultaneously
func GOMAXPROCS(n int) int
We will count the lines quantity in a large file using a basic master - worker model in Golang in four different ways:
More info...
https://github.com/ManuCastrillonM/glast