Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Goでのチーム開発とコード管理の悩み/Team development and code ma...
Search
Kentaro Kawano
January 25, 2016
Programming
0
38
Goでのチーム開発とコード管理の悩み/Team development and code management in Go
Goを初めて採用したプロジェクトでの、チーム開発、コード管理での悩み、試行錯誤についてまとめました。
Kentaro Kawano
January 25, 2016
Tweet
Share
More Decks by Kentaro Kawano
See All by Kentaro Kawano
Goでのレシーバーとnilの関係 / Receiver and nil relationship in Go
kawaken
0
390
Starting Python
kawaken
0
39
Goの時刻に関するテスト/Testing time in Go
kawaken
0
42
AWS Lambda + Go
kawaken
0
36
goaのdesignをラクに書く/Write goa design easily
kawaken
0
33
Pyvmomiとansibleのdynamic inventory
kawaken
0
46
Other Decks in Programming
See All in Programming
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
Symfony Mapper Component
soyuka
2
730
Discord Bot with AI -for English learners-
xin9le
1
120
Recoilを剥がしている話
kirik
5
6.6k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
120
103 Early Hints
sugi_0000
1
220
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
layerx_20241129.pdf
kyoheig3
2
290
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Writing Fast Ruby
sferik
628
61k
Embracing the Ebb and Flow
colly
84
4.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Documentation Writing (for coders)
carmenintech
66
4.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
94
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Making the Leap to Tech Lead
cromwellryan
133
9k
Transcript
GoͰͷνʔϜ։ൃͱ ίʔυཧͷΈ ୈ2ճ ؔgolangษڧձ Kentaro Kawano
About Me • Kentaro Kawano/@kawaken • γφδʔϚʔέςΟϯά, TechScore • Go,
Python, Rails, swift
Goྺ • ݸਓ – 1.2͔Β͞ΘΓॳΊͨ – CLIπʔϧͳͲͷ࡞͕த৺ – WebΞϓϦ࡞ͬͯͳ͔ͬͨ •
ࣄ – σʔλ࡞ɺνϟοτ༻πʔϧͳͲ – 9݄͔Βຊ֨తʹϓϩδΣΫτʹಋೖ
νʔϜ։ൃͷΈ
GoͷϨϕϧ্͛ • ֶश͕ඞਢ – ৮ͬͯΔਓগͳ͍ – Go Quiz Έ͍ͨͳڭࡐΛ΄΅Ͱఏڙ •
࡞Δͷ͠ΜͲ͔ͬͨ – ि1ճ30ͷ؆୯ͳษڧձ – ॻ੶
ใऩू • Blog, GoCon, Advent Calendar ͳͲ • ଞࣾࣄྫ͋Γ͕͍ͨ –
ࢀߟʹͳΔ͠ʮGo૿͑ͯΔײʯେࣄ
։ൃڥߏங • ϝϯόʔͷڥ – جຊ͓ͤ • ҎલVirtualBoxͷΠϝʔδΛ – Α͘͏πʔϧͷΠϯετʔϧεΫϦϓτΛ࡞
• golang.org/x/tools/cmd/ʙ • golint,gocode ͳͲίʔυؔ࿈ͷπʔϧ • gom,fresh,gooseͳͲͷϓϩδΣΫτͰ͏πʔϧ
CI/CDڥ • ৽͘͠ߏங – طଘڥͷྲྀ༻Ͱ্ख͍͔͘ͳ͍͜ͱ • ίʔυԽΛࢦ͢ʢʙ as a Codeʣ
– drone.io(Docker),Ansible,TerraformͳͲ • ੩తϑΝΠϧͷѻ͍͕ఆ·ͬͯͳ͍ – go-bindata? • ϗοτσϓϩΠ͕ະݕূ – ಈ࡞֬ೝͰ͖ͯͳ͍
ϨϏϡʔ • gofmt,golintͳͲπʔϧͰࠣͳ෦ճආ – CIͰνΣοΫͰ͖Δ • εΩϧ͕ίʔυʹݱΕ͍͢ؾ͕͢Δ – εΩϧࠩͰͲ͏ͯ͠ѱ͍ํཱ͕ͭ •
جຊతͳ෦ͷهड़͕૿͑Δ͔Βʁ – ڭҭେࣄͰ͢ͶɺΈ͍ͨͳҙࣝͷߴ·Γ • Go Β͍͠ίʔυͱԿ͔ʁ – ·ͩΑ͘Θ͔Βͳ͍ – มͳίʔυʹͳΓʹ͍͘
ίʔυཧͷΈ
ϥΠϒϥϦͷબ • ރΕͯΔɺϝϯς͞Εͯͳ͍ͷஅ͕͠ ͍ • ୯७ͳϕϯνϚʔΫ͚ͩͰΘ͔Βͳ͍ – MiddlewareɺηΩϡϦςΟରࡦɺηογϣϯ ཧͳͲ •
໎ͬͨΒඪ४ʹدͤΔʢϜϦʹ࠾༻͠ͳ ͍ʣ
Gin • Gin࠷ʂΈ͍ͨͳهࣄ͋Δ • ࠾༻ࣄྫݟ͔͚Δ • ϝϯς͞Ε͍ͯΔͷʁΈ͍ͨͳIssue͋ͬͨ • contribͷϓϧϦΫ͕์ஔ͞Ε͍ͯͨΓ… •
͍ͬͯΔਓଟͦ͏͚ͩͲɺຊʹେৎ ͔ʁ – ࠷ѱࣗͨͪͰϝϯς͢Δͱ͍͏֮ޛͰ࠾༻
ύοέʔδߏ • SCMʹGitLabΛ༻ – αϒύοέʔδͷ go get ͕Ͱ͖ͳ͍ • ݸผͷϦϙδτϦΛ࡞ͬͯରԠ
• ্࣮ͷෆ߹ͳ͍ • CIͷઃఆͳͲ͕खؒ
Gom • master ʹ͕͋ΔͱɺϒϥϯνͷΓସ ͕͑Ͱ͖ͳ͍ – gin-gonic/contrib/sessions – aws/aws-sdk-go •
࠷ۙɺҰ࣌తʹmaster͕ϏϧυΤϥʔʹ • Ұ࣌తʹforkͯ͠मਖ਼ • मਖ਼ΛϓϧϦΫ͍͕ͨ͠ख͔ͭͣ…
σʔλϕʔεؔ࿈ • database/sqlͱlib/pqͰؤுͬͯΔ • drone/sqlgenΛͬͯΈͨ – JSONܕͰ͍ํ͕߹Θͳ͔ͬͨ • Ϟσϧؔ࿈ͷίʔυδΣωϨʔλΛࣗ࡞ –
ERਤ͔ΒϞσϧ࡞ • ݕࡧػೳͳͲͰSQLͷΈཱͯʹۤ࿑ – ΫΤϦϏϧμ࠾༻ͯ͠ྑ͔͔ͬͨ…
໊લ͚ • ͰࣅͨΑ͏ͳ໊લͷఆ͕ٛ૿͑Δ – ϦΫΤετύϥϝʔλอ࣋༻ͷstruct • HogeRequestParams • FugaRequestParams –
ίʔυཧ༻ͷconst • ܕ໊Λઌʹ͚ͭͯճආ – ABSuccess – XYSuccess – ڞ௨ԽͰ͖ͳ͍… • ύοέʔδΛࡉ͔͘͢Δ͔͠ͳ͍ʁ
ςετؔ࿈ • testifyΛͬͯassertion؆୯ʹॻ͚ΔΑ͏ • go test – ./... Λ͚ͭͳ͍ͱμϝ •
αϒύοέʔδͷςετ͕εϧʔ͞Ε͍ͯͨ – -race ͚ͭΔ • ඇಉظॲཧͰո͍͠ͱ͜Ζ͕ݕग़Ͱ͖Δ • ݁Ռ͕Θ͔Γʹ͍͘ͷͰͲ͏ʹ͔͍ͨ͠
GOͷײ
ֶशίετߴ͘ͳ͍ • ߴ͘ͳ͍ͱݟࠐΜͰ͚ͨͲɺ࣮ࡍߴ͘ͳ͍ • ֮͑Δ͜ͱ͕ଟ͘ͳ͍ • goroutineपΓͰͪΐͬͱϋϚͬͨఔ – ͍ํͷ –
syncύοέʔδͰղܾͰ͖Δͱࢥ͏ • มͳ҉͕ͳ͍
։ൃޮѱ͘ͳ͍ • Railsͱൺֱͯ͠ – ίʔυΛॻ͘ྔ૿͑ͨͱࢥ͏ – มͳϋϚΓํ͠ͳ͍ – ͙͢ʹಈ͘ϞϊͰ͖ͳ͍ •
ڥඋʹ͕͔͔࣌ؒͬͨ – ࠷ॳͳͷͰํͳ͍ – ͔࣍ΒॖͰ͖Δ࣌ؒ • ࠓ·ͰͱൺͯḮ৭ͳ͍ޮͰਐΜͰ͍Δ – ࠷ॳͷํ໎͚ͯͨ͠ͲΓͬͨ
ӡ༻͜Ε͔Β • ࣮ࡍͬͯΈͳ͍ͱΘ͔Βͳ͍ • ίετݮʹͭͳ͕ͬͨΒͱ͍͏ظ – AWSͷΠϯελϯεΛখ͍͞Ϟϊʹม͑Δͱ͔ – ࠓޙͷόʔδϣϯΞοϓରԠͷෛՙ
͓ΘΓ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠