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
34
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
380
Starting Python
kawaken
0
32
Goの時刻に関するテスト/Testing time in Go
kawaken
0
36
AWS Lambda + Go
kawaken
0
31
goaのdesignをラクに書く/Write goa design easily
kawaken
0
27
Pyvmomiとansibleのdynamic inventory
kawaken
0
38
Other Decks in Programming
See All in Programming
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
860
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
役立つログに取り組もう
irof
28
9.6k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
210
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Producing Creativity
orderedlist
PRO
341
39k
4 Signs Your Business is Dying
shpigford
180
21k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
RailsConf 2023
tenderlove
29
900
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Practical Orchestrator
shlominoach
186
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
680
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ͷΠϯελϯεΛখ͍͞Ϟϊʹม͑Δͱ͔ – ࠓޙͷόʔδϣϯΞοϓରԠͷෛՙ
͓ΘΓ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠