Go言語をほぼ毎日書いている話 (序) / Daily coding in Go

Go言語をほぼ毎日書いている話 (序) / Daily coding in Go

そうだ、Go京都。

A658ec7f1badf73819dfa501165016c1?s=128

Yuuki Tsubouchi (yuuk1)

April 29, 2017
Tweet

Transcript

  1. GoݴޠΛ ΄΅ຖ೔ॻ͍͍ͯΔ࿩ (ং) ͸ͯͳ id:y_uuki

  2. id:y_uuki / @y_uuk1 Yuuki Tsubouchi https://yuuk.io גࣜձࣾ͸ͯͳ WebΦϖϨʔγϣϯΤϯδχΞ / γχΞΤϯδχΞ

  3. Goྺ • 2013೥͙Β͍͔ΒWatch • 2014೥ʹ·ͱ΋ʹॻ͖࢝Ίͨ • ࠷ॳ͸Tour of Go •

    Go Kyotoͱ͍͏Jxck ͞ΜʹΑΔϋϯζΦϯʹࢀՃ • mkr / mackerel-client-go ͳͲΛॻ͍ͨ • 2015೥~2016લ൒ ͍͔ͭ͘ΦϖϨʔγϣϯπʔϧͭͬͨ͘ • grabeni / droot / gokc ͳͲ
  4. http://developer.hatenastaff.com/entry/golang-for-ops

  5. None
  6. ͳΜͰ ຖ೔ॻ͖࢝Ίͨͷ͔

  7. ͳΜͰຖ೔ॻ͖࢝Ίͨͷ͔ • ΦϖϨʔγϣϯ͢ΔΑΓɺιϑτ΢ΣΞͱ͔จষΛॻ ͍ͯΔͱ͖ͷ΄͏͕࣮͸޷͖ • ϒϩά΋͍͍͚Ͳ͍͔ͭ୅දతϓϩμΫτΛ࡞ͬͯΈ ͍ͨ • ͔͠͠ɺιϑτ΢ΣΞΛॻ͘εΩϧͱɺॻ্͖͛Δମ ྗ͕଍Γͳ͍

    => ຖ೔ίʔυॻ͜͏
  8. Site Reliability Engineering HOW GOOGLE RUNS PRODUCTION SYSTEMS Photo by

    O’reilly Media / CC by 3.0 http://shop.oreilly.com/product/0636920041528.do https://creativecommons.org/licenses/by/3.0/deed
  9. ͳʹΛ ຖ೔ॻ͍͍ͯΔͷ͔

  10. DiamonDB https://github.com/yuuki/diamondb

  11. write datapoints Kinesis Streams Lambda read datapoints ElastiCache DynamoDB Lambda

    TTL expired flush write Web App (Golang) S3 read read read
  12. write datapoints Kinesis Streams Lambda read datapoints ElastiCache DynamoDB Lambda

    TTL expired flush write Web App (Golang) S3 read read read AWSͷෳ਺ͷσʔλετΞΛ ૊Έ߹Θͤͨ Go ΢ΣϒΞϓϦέʔγϣϯ
  13. ͳʹΛຖ೔ॻ͍͍ͯΔͷ͔ • DiamonDB • ͍͍ͩͨಉ͡ΞʔΩςΫνϟͷ΋ͷΛۀ຿Ͱ։ൃத • ίʔυϕʔε͸ۀ຿ͷ΋ͱ͸ผ • ͜Ε·Ͱͭͬͨ͘πʔϧͷϝϯςφϯε •

    ۀ຿Ͱ࢖͍ͬͯΔͷͰɺमਖ਼΍ػೳ௥Ճ • Pull RequestରԠ
  14. ຖ೔ॻͨ͘Ίʹ ΍Δ͜ͱ

  15. ຖ೔ॻͨ͘Ίʹ΍Δ͜ͱ • ʮຖ೔ʯࣗମʹ͸ҙຯ͸ͳ͘ɺܧଓతʹίʔυΛॻ͚Δ͔͕େࣄ • 1 commit / day Ͱ΋Α͍ •

    Ͳ͏ͯ͠΋๩͚͠Ε͹ɺgit commit —date Ͱ೔෇͔͖͔͑ • ͜ΕͰϞνϕʔγϣϯ͕ଓ͘ͳΒͦΕͰΑ͍ • ฏ೔͸͋·Γॻ͚ͳ͍ͷͰɺ౔೔ͷ͏ͪʹΠγϡʔΛ༻ҙ • ۀ຿ͱ݁ͼ͚ͭΔ • ෳ਺ͷϓϩδΣΫτΛ΋ͭ
  16. ຖ೔ॻ͍͍ͯͯ Θ͔ͬͨ͜ͱ

  17. ຖ೔ॻ͍͍ͯͯΘ͔ͬͨ͜ͱ • ຖ೔ίʔυॻͨ͘ΊͷϦζϜ͕Ͱ͖Δ • ೴಺ϝϞϦʹͷͬͯΔͷͰɺ࣍ʹॻ͘ͱ͖ʹ೰·ͳ͍ • ͍͖ͳΓେ͖͘มߋ͢ΔͷͰ͸ͳ͘ɺখ͞ͳมߋΛੵ ΈॏͶΔΑ͏ʹͳΔ • ౔೔ʹແཧ͠ͳ͘ͳΔ

    • ແཧΛ͢Δͱ݁ہଓ͔ͳ͍
  18. Go tips

  19. https://github.com/yuuki/yuuki/blob/master/golang/http-api-server-stack.md GoͰHTTP APIαʔόॻ͘ͱ͖ͷελοΫ GoͰHTTP APIαʔόॻ͘ ͱ͖ͷελοΫ

  20. https://medium.com/@haya14busa/idiomatic-go-readability-f0b42ef381dc

  21. https://github.com/golang/go/wiki/CodeReviewComments

  22. ;ͩΜΈ͍ͯΔ Gophers • @deeeet • @mattn • @motemen • @Songmu

    • @haya14busa • @davecheney • @dgryski
  23. Πϯϓοτ ͱ Ξ΢τϓοτ

  24. ΠϯϓοτͱΞ΢τϓοτ • Πϯϓοτ: ຊΛಡΉɺϒϩάΛಡΉͳͲ • Ξ΢τϓοτ: ٕज़ஊٛɺൃදɺϒϩάɺίʔυͳͲ • ݺٵͷΑ͏ͳ΋ͷ •

    Πϯϓοτ͢ΔͱΞ΢τϓοτͨ͘͠ͳΔɻΞ΢τϓο τ͢Δͱ·ͨΠϯϓοτΛ΋ͱΊΔ • Ξ΢τϓοτ͸ҰݟແବʹΈ͑Δ͕ɺఆظతʹΞ΢τϓο τ͢Δ͜ͱͰΠϯϓοτ΋૿͍͑ͯ͘
  25. GoݴޠΛ ΄΅ຖ೔ॻ͍͍ͯΔ࿩ (ং) ͸ͯͳ id:y_uuki