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合宿進捗ありません
Search
jollyjoester
April 23, 2017
Programming
0
590
Go合宿進捗ありません
Go合宿@土善旅館でのLT
jollyjoester
April 23, 2017
Tweet
Share
More Decks by jollyjoester
See All by jollyjoester
コミュニティMTG in WWDC24
jollyjoester
0
210
BengaluruでLTしてきた
jollyjoester
0
250
try! Swift Tokyo 2024
jollyjoester
0
210
エンジニアが直接会う場の価値について
jollyjoester
8
4k
来年Proposalを出すつもりで参加するときっともっと楽しい!
jollyjoester
0
280
My favorite sessions in WWDC 23
jollyjoester
0
560
みんなでAIと戯れよう
jollyjoester
0
93
続く勉強会の作り方
jollyjoester
2
790
Code for INZAIの歩み
jollyjoester
0
340
Other Decks in Programming
See All in Programming
Hotwire or React? ~Reactの録画機能をHotwireに置き換えて得られた知見~ / hotwire_or_react
harunatsujita
9
4.6k
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
C#/.NETのこれまでのふりかえり
tomokusaba
1
170
Server Driven Compose With Firebase
skydoves
0
420
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
250
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
460
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
450
Tuning GraphQL on Rails
pyama86
2
1.2k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
230
Golang と Erlang
taiyow
8
1.9k
Vue.js学習の振り返り
hiro_xre
2
130
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Agile that works and the tools we love
rasmusluckow
327
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Making Projects Easy
brettharned
115
5.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Unsuck your backbone
ammeep
668
57k
Fireside Chat
paigeccino
32
3k
It's Worth the Effort
3n
183
27k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Transcript
2017/04/23 jollyjoester Go߹॓ ਐḿ͋Γ·ͤΜ
ࣗݾհ
• ࣣౡҒ೭(@jollyjoester) • Repro Inc. • ͯ͢ख़ / Kanpai-er •
ೖऀ͚iOSΞϓϦ։ൃຊॻ͍ͨ Coming Soon
SwiftѪձ • Swift͖͕ू·ͬͯΘ͍Θ͍ʰָ͠Ήձʱ • Ϩϕϧɺܦݧෆ ‣ Swift͕͖ͳਓʂ ‣ SwiftΛ͖ʹͳΔ༧ఆͷਓ ‣
Ή͠ΖSwift͔Β͔Ε͍ͯΔਓ • ݄̍։࠵ඪ ‣ ฏɿஊٛ ‣ ٳɿٱ͘͘ձʴஊٛ ࣍ճ4/28
ࢲͷGoܦྺ • ॳΊ͔ͯΒগͳ͘ͱ542 ɹ ɹ ɹ ɹ
ࢲͷGoܦྺ • ॳΊ͔ͯΒগͳ͘ͱ542 • ࣮࣭ͬͨͷ3 ɹ ɹ ɹ
ࢲͷGoܦྺ • ॳΊ͔ͯΒগͳ͘ͱ542 • ࣮࣭ͬͨͷ3 • υοτΠϯετʔϧʢ542લʣ ɹ ɹ
ࢲͷGoܦྺ • ॳΊ͔ͯΒগͳ͘ͱ542 • ࣮࣭ͬͨͷ3 • υοτΠϯετʔϧʢ542લʣ • Goೖऀ͚ϋϯζΦϯʢڈͷͲ͔͜ʣ ɹ
ࢲͷGoܦྺ • ॳΊ͔ͯΒগͳ͘ͱ542 • ࣮࣭ͬͨͷ3 • υοτΠϯετʔϧʢ542લʣ • Goೖऀ͚ϋϯζΦϯʢڈͷͲ͔͜ʣ •
Go߹॓ʂ
ࠓճͷࢥ ʮA Tour of GoͰͪΌͪΌͬͱͬͯͳΜ͔ͷΞϓϦ έʔγϣϯ࡞Δͧʂʯ
ɹ݁Ռ
ɹ݁Ռ ਐḿ͋Γ·ͤΜ
A Tour of Goܦա • ࠷ॳʹ্ా͞ΜͷΛฉ͘ʢΔؾˢʣ • A Tour of
GoΛ࢝ΊΔʢΔؾˢʣ • ͍ͭ·ͰܦͬͯऴΘΒͳ͍ʢΔؾˢʁʣ • ͩΜͩΜͭ·ͮ͘͜ͱ͕ଟ͘ͳ͖ͬͯͨʢΔؾˣʁʣ • શମͷϘϦϡʔϜݟͯΈͨʢΔؾˣʣ ʢstructʹϝιουੜ͢ͱ͜·Ͱ͔͠ߦ͚ͳ͔ͬͨʣ
A Tour of Go ͭ·͖ͮϙΠϯτ̍ • Capacity is Կʁ
A Tour of Go ͭ·͖ͮϙΠϯτ̍ • range is Կʁ
A Tour of Go ͭ·͖ͮϙΠϯτ̍ • deferͷείʔϓ
ܾஅ ϐϘοτ͢Δͧʢಀ͛ͨʣ
࣍ͷ࡞ઓ • จ๏ͱ͔Θ͔Βͳͯ͘ಈ͘ͷ͕͋Ε͍͍ • ʮKamiʯͬͯͷΛ࡞ͬͨਓ͕ࢀՃऀʹ͍ΔΒ͍͠ͷͰΈ ͯΈΔ͔ • ʢ࠷ѱ࡞ऀ͔Β̍ථ͍͖ͨͩͩʣ
Kami৮ͬͯΈͨ • Web framework with context • https://github.com/guregu/kami
Kami৮ͬͯΈͨ
Kamiಈ͍ͨ
Ҏ্
ͬ͞ͺΓΘ͔ΒΜ
ͱ͍͑ ֶΜͩ͜ͱ • contextύοέʔδ is Կ • Middleware is Կ
• net/httpΕΑ
contextύοέʔδ • ϦΫΤετͷΩϟϯηϧͱλΠϜΞτͱϦΫΤετε ίʔϓͷมΛѻ͏ͷ • Go 1.7͔Βຊମʹ౷߹ • *http.Requestʹcontextؔ࿈ͷϝιου͕Ճ͞Εͨ •
Kami͜Ε͕ग़ΔલʹcontextΛѻ͍͔ͨͬͨ
Middleware is Կʁ • ΞϓϦέʔγϣϯͷϝΠϯϩδοΫͷલޙʹڬΉॲཧ • ʢLaravelͱ͔Ͱݟ͔͚ͨݴ༿ͳͷͰ࠷ۙͷαʔόʔα ΠυͰී௨ͷ֓೦ʁʣ
Goͷnet/httpڧྗ ͱΓ͋͑ͣnet/httpΛͬͯΈͳΕ
ͬͯ@guregu͞Μ͕ݴͬͯͨ
ࢀߟࢿྉ • https://github.com/guregu/kami#usage • http://go-talks.appspot.com/github.com/guregu/ slides/kami/kami.slide#1 • https://blog.golang.org/context
Always See Everything
Thank you!