Development/Go
Go 기초
juniz
2020. 8. 23. 03:01
반응형
Characteristic
- Simple
- Fast compiling speed, Cross-compiling
- Concurrency
- Goroutine - Execution
- Chanel - Communication
- Select - Coordination
- Error Handling
val, er := Get()
if err =! nil {
//error handling
}
Go keywords
break default func interface select
case defer go map struct
chan else goto package switch
const fallthrough if range type
continue for import return var
Install Go [link]
Init mode `go mod init <name>`
Hello World
Terminal : `mkdir helloworld`
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
To rn : `go run helloworld`
반응형