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
Tomoki Ota
August 29, 2024
Programming
73
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Go言語】反復処理
反復処理について解説しています
Tomoki Ota
August 29, 2024
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
120
アーキテクチャとビジネスロジック
tomo1227
0
120
【Go言語】テスト
tomo1227
0
91
【Go言語】クロージャ
tomo1227
0
330
【Go言語】イテレータ
tomo1227
0
110
【Go言語】エラーハンドリング
tomo1227
0
92
AIに淘汰されないようにするには?
tomo1227
0
94
【Go言語】range
tomo1227
0
100
【Go言語】break
tomo1227
0
95
Other Decks in Programming
See All in Programming
Vite+ Unified Toolchain for the Web
naokihaba
0
340
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
AIで効率化できた業務・日常
ochtum
0
140
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
5.4k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
740
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.8k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
190
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
Exploring anti-patterns in Rails
aemeredith
3
420
Practical Orchestrator
shlominoach
191
11k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Site-Speed That Sticks
csswizardry
13
1.2k
Embracing the Ebb and Flow
colly
88
5.1k
The Language of Interfaces
destraynor
162
27k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
620
Transcript
Tomoki Ota ʲGoݴޠʳ෮ॲཧ
෮ॲཧͷॱং ෮ॲཧதͷmapͷૠೖ ΞδΣϯμ 2
෮ॲཧͷॱং
෮ॲཧͷॱং 4 σʔλΛΩʔͰιʔτͯ͠อ͍࣋ͯ͠ΔΘ͚Ͱͳ͍(mapೋʹج͍͍ͮͯΔ) σʔλ͕Ճ͞Εͨͱ͖ͷॱংΛอ͍࣋ͯ͠ΔΘ͚Ͱͳ͍(1ͷAͷޙʹ1ͷBΛૠೖͯ͠ɺ ͜ͷૠೖॱʹجͮ͘ఆͰ࣮͍͚ͯ͠ͳ͍)
෮ॲཧͷॱং 5
෮ॲཧͷॱং 6 acdeyz ? ayzcde ? aczdey ?
෮ॲཧͷഎܠ 7 ෮ॲཧͷҰ༷Ͱͳ͍ͷͰɺެࣜͰϥϯμϜͰͳ͘ ఆΊΒΕ͍ͯͳ͍ͱ͞Ε͍ͯΔɻ
෮ॲཧͷഎܠ 8 Goͷઃܭऀ ։ൃऀ͕mapΛѻ͏ͱ͖ʹ ॱংͷաఔʹґଘ͠ͳ͍Α͏ʹ ͋ΔछͷϥϯμϜੑΛՃͨ͠ɻ
։ൃऀɺmapΛ෮ॲཧ͢Δͱ͖ ʹॱংΛԾఆ͍͚ͯ͠ͳ͍ɻ
෮ॲཧͷഎܠ 10 ඪ४ϥΠϒϥϦ֎෦ϥΠϒϥϦͷύοέʔδͰɺॱং͕อͨ ΕΔ߹͋Δɻencoding/json͕mapΛJSONʹϚʔγϟϧ͢ Δͱ͖ɺૠೖॱংʹؔͳ͘ɺσʔλΛΩʔͰΞϧϑΝϕοτॱ ʹฒͼସ͑Δɻ
෮ॲཧͷഎܠ 11 ඪ४ϥΠϒϥϦ֎෦ϥΠϒϥϦͷύοέʔδͰɺॱং͕อͨ ΕΔ߹͋Δɻencoding/json͕mapΛJSONʹϚʔγϟϧ͢ Δͱ͖ɺૠೖॱংʹؔͳ͘ɺσʔλΛΩʔͰΞϧϑΝϕοτॱ ʹฒͼସ͑Δɻ ͜ΕGoͷಛੑͰͳ͍ʂ
ॱং͚͕ඞཁͳ߹ 12 όΠφϦώʔϓͳͲଞͷσʔλߏΛ༻͢Δ (GoDSϥΠϒϥϦͳͲ)
෮ॲཧதͷmapͷૠೖ
෮ॲཧதͷmapͷૠೖ 14
15 mapͷΤϯτϦ͕෮ॲཧதʹ࡞͞ΕΔ߹ɺ෮ॲཧதʹऔ Γग़͞ΕΔ͔͠Ε·ͤΜ͠ɺεΩοϓ͞ΕΔ͔͠Ε·ͤΜɻ ͲͪΒʹͳΔͷ͔ɺ࡞͞Ε֤ͨΤϯτϦ͝ͱʹҟͳͬͨΓɺ ෮ॲཧͷ࣮ߦ͝ͱʹҟͳͬͨΓ͠·͢ɻ Ώ͑ʹɺ͋Δ෮ॲཧதʹཁૉ͕Ճ͞Εͨ߹ɺ࣍ͷ෮Ͱͦ ͷཁૉ͕औΓग़͞ΕͨΓ͢Δ͔͠Εͳ͍͠ɺऔΓग़͞Εͳ͍͔ ͠Εͳ͍ɻ ෮ॲཧதͷmapͷૠೖ
16 ෮ॲཧதʹmapΛߋ৽͠ɺ Ճ͞ΕͨΤϯτϦ͕෮ॲ ཧͰऔΓग़͞Εͳ͍͜ͱΛอ ূ͍ͨ͠߹Ϛοϓͷί ϐʔΛ࡞ͯ͠ɺͦͷίϐʔΛ ߋ৽͢Δɻ ෮ॲཧதͷmapͷૠೖ
·ͱΊ 17 mapΛѻ͏ࡍɺҎԼͷͷʹґଘ͍͚ͯ͠ͳ͍ɻ ΩʔͰॱং͚͞Εͨσʔλ ૠೖॱংͷอ࣋ ܾఆతͳ෮ॱং ෮ॲཧதʹՃ͞Εͨཁૉͷੜ