AN INTRODUCTION TO … ( ͡° ͜ʖ ͡°)
GOLANG
WIKIPEDIA SAYS THAT …
▸“Go (often referred to as golang) is a programming
language created at Google[12] in 2009 by Robert
Griesemer, Rob Pike, and Ken Thompson."
WHOAMI … (◠‿◠)
GOLANG
GOOGLE TRENDS
(╯°□°)╯︵ ┻━┻
YET ANOTHER LANGUAGE OR …
GOOGLE
ABSTRACT
▸Problem to solve
▸Multicor Processors
▸Web programming
▸Needed Features
▸Concurrency *
▸Garbage collection
▸Dependency management
▸Testing *
▸Coding Standard *
GOOGLE
KEY FEATURES
▸Fast
▸Scalable
▸Productive
(◠‿◠)
ABOUT GO FEATURES …
FEATURES
FEATURES
▸Compiled
▸Garbage collected
▸Statically typed
▸Open source
▸Google uses public repository
▸BSD Licence
FEATURES
DEPENDENCIES
▸Tempo di compilazione
▸40x faster than C
▸Unused #include/import
▸Warning (C) - Error (Go)
FEATURES
PACKAGES
▸Dependency management
▸Go get github.com/foo/bar
▸import “foo/bar”
▸import alias “vendor/package”
FEATURES
RESERVED KEYWORDS
FEATURES
CONCURRENCY
▸CSP (Communicating Sequential Process)
▸A language for describing patterns of interaction.
▸A model of concurrency in which values are passed between
independent activities
FEATURES
BANNED FEATURES … ┐(‘~` )┌
▸Ternary operator
▸While
▸Implicit conversion
▸Inheritance
FEATURES
COMPOSITION NOT INHERITANCE … ヽ(´ー`)ノ
▸Allow methods in any type
▸No subclassing
▸Interfaces
▸Implicit
FEATURES
TYPE ASSERTION
▸a type assertion fornisce un accesso ai valori di una interfaccia
presente in un valore concreto
FEATURES
SOME TOOLS
▸Go build
▸* compiled
▸Go test
▸* testing
▸Go fmt -w filename
▸* coding standard
HELLO WORLD
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
MULTIPLE RETURN
VALUES
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
VARIADIC
FUNCTIONS
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
CHANNELS ARE THE PIPES THAT CONNECT
CONCURRENT GOROUTINES. YOU CAN SEND VALUES
INTO CHANNELS FROM ONE GOROUTINE AND RECEIVE
THOSE VALUES INTO ANOTHER GOROUTINE.
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
IMPLICIT
INTERFACES
お(^O^)や(^O^)す(^。^)みぃ(^-^)ノ゙
HTTPS://GOBYEX
AMPLE.COM/
ALL EXAMPLE HERE …(´∀`)
TEST DRIVEN
DEVELOPMENT
(◠‿◠) BUILD GREAT SOFTWARE
WITH
TEST DRIVEN DEVELOPMENT
TESTING Fizz buzz is a group word
game for children to teach
them
about division.[1] Players
take turns to count
incrementally, replacing
any number divisible by
three with the word "fizz",
and any number divisible
by five with the word
"buzz".
LINKS … (◠‿◠)
RESOURCES
LINKS
▸https://www.cheatography.com/explore/search/?q=golang
▸https://github.com/sensorario/awesome-go
▸https://github.com/sensorario/go-design-patterns
▸https://gobyexample.com/
▸https://tour.golang.org/welcome/1
▸https://talks.golang.org/2012/splash.article
▸https://golang.org/
▸https://gophers.slack.com (#italy)
▸http://www.usingcsp.com/
GITHUB PROJECTS
FRAMEWORKS
♪┏(・O・)┛♪┗ ( ・O・) ┓
AND FINALLY … (◠‿◠)

Back end User Group / Golang Intro