Successfully reported this slideshow.
Your SlideShare is downloading. ×

Golang

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 11 Ad

More Related Content

Advertisement

Recently uploaded (20)

Golang

  1. 1. Golang
  2. 2. • 去年買了⼀本書:深入淺出Go • ⾃⼰⽬前還不算完全掌握Golang • 只是過年把它⼤概的看完, • 指標 • 模組 • 多執⾏緒/並⾏處理 ...需要後續補⾜ • 謝謝後端團隊的⼤家讓我有機會使⽤在專案上。 動機
  3. 3. • 是Google開發的⼀種靜態強型別、編譯型、並發型,並具有垃圾 回收功能的程式語⾔。(From wiki) • https://golang.org/ 簡介
  4. 4. • go build • go fmt • go test 常⾒指令
  5. 5. • 以猜數字⼩遊戲為例, 簡介 Golang 基本元素 • https://github.com/r567tw/go-practice/blob/master/makeGame/ main.go 猜數字⼩遊戲
  6. 6. • go.mod 類似 composer.json , package.json 註明需要的modules • go.sum 類似 yarn.lock , package-lock.json , ⽤來做版本的校對 淺談 go.mod & go.sum
  7. 7. • Manual version • CDK version (如何獲取環境變數, 以Docker為例) • SAM version (API Gateway 版本, 以SAM預設專案為例) • 以拆帳報表專案為例 Go ❤ Lambda
  8. 8. • Event 定義的如果需要匯出請務必開頭為⼤寫 • if / for ⼤括號務必要在同⼀⾏ • 請記得使⽤ github.com/aws/aws-lambda-go/lambda • https://docs.aws.amazon.com/zh_tw/lambda/latest/dg/ golang-handler.html 結論: 幾個注意事項(我踩過的坑)
  9. 9. • Show you codes • // go:embed input.txt Golang 1.16 ⿊魔法: embed
  10. 10. • https://medium.com/ %E5%BE%AE%E5%B3%AF%E9%A3%9B%E7%BF%94/ golang-go-mod- %E8%B5%B7%E6%89%8B%E5%8B%A2-39a0be969 ff c • https://openhome.cc/Gossip/Go/Module.html • https://studygolang.com/articles/25658 • https://mileslin.github.io/2020/01/Golang/Go-Module- %E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B%E7 %AD%86%E8%A8%98/ 參考資料(關於go.mod & go.sum)
  11. 11. • https://zh.wikipedia.org/zh-tw/Go • https://golang.org/ • https://docs.aws.amazon.com/zh_tw/lambda/latest/dg/lambda- golang.html • https://github.com/r567tw/go-practice • 參考資料

×