Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
35
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
36
Goの時刻に関するテスト/Testing time in Go
kawaken
0
38
AWS Lambda + Go
kawaken
0
33
goaのdesignをラクに書く/Write goa design easily
kawaken
0
29
Pyvmomiとansibleのdynamic inventory
kawaken
0
41
Other Decks in Programming
See All in Programming
[FlutterKaigi2024] Effective Form 〜Flutterによる複雑なフォーム開発の実践〜
chocoyama
0
3.9k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
160
CSC509 Lecture 13
javiergs
PRO
0
140
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
Djangoの開発環境で工夫したこと - pre-commit / DevContainer
hiroki_yod
1
560
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
8
3.5k
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
150
PipeCDの歩き方
kuro_kurorrr
3
140
Vapor Revolution
kazupon
2
2.4k
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
8k
Full stack testing :: basic to basic
up1
1
800
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
0
730
Featured
See All Featured
Side Projects
sachag
452
42k
Happy Clients
brianwarren
98
6.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Embracing the Ebb and Flow
colly
84
4.5k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Invisible Side of Design
smashingmag
298
50k
Visualization
eitanlees
145
15k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Gamification - CAS2011
davidbonilla
80
5k
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ͷΠϯελϯεΛখ͍͞Ϟϊʹม͑Δͱ͔ – ࠓޙͷόʔδϣϯΞοϓରԠͷෛՙ
͓ΘΓ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠