This is a draft cheat sheet. It is a work in progress and is not finished yet.
Golang
Types
- int, int8, int16, int32
- byte, uint, uint16, uint32, uint64
- float32, float64
- complex, complex64, complex128
- bool
- String
- pointers |
Les variables et fonctions en Go
package main
import (
"fmt"
)
const pi = 3.1416
var x int = 5
func main() {
var (
a float64 = 8.8
b flat 64
)
b= fonction(a)
fmt.Printf("valeur: %f", b)
}
func fonction(z float64) float32 {
u := 3.3
return u*z
}
|
Les variables et fonctions en Go
package main
import (
"fmt"
)
const pi = 3.1416
var x int = 5
func main() {
var (
a float64 = 8.8
b flat 64
)
b= fonction(a)
fmt.Printf("valeur: %f", b)
}
func fonction(z float64) float32 {
u := 3.3
return u*z
}
|
|
|
|
|
|