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
0
10
【Go言語】反復処理
反復処理について解説しています
Tomoki Ota
August 29, 2024
Tweet
Share
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
26
アーキテクチャとビジネスロジック
tomo1227
0
25
【Go言語】テスト
tomo1227
0
15
【Go言語】クロージャ
tomo1227
0
130
【Go言語】イテレータ
tomo1227
0
17
【Go言語】エラーハンドリング
tomo1227
0
18
AIに淘汰されないようにするには?
tomo1227
0
25
【Go言語】range
tomo1227
0
9
【Go言語】break
tomo1227
0
21
Other Decks in Programming
See All in Programming
Vapor Revolution
kazupon
2
350
Outline View in SwiftUI
1024jp
1
340
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
250
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1.1k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
みんなでプロポーザルを書いてみた
yuriko1211
0
280
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
140
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Macとオーディオ再生 2024/11/02
yusukeito
0
390
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
310
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Adopting Sorbet at Scale
ufuk
73
9.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Documentation Writing (for coders)
carmenintech
65
4.4k
The Language of Interfaces
destraynor
154
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Code Reviewing Like a Champion
maltzj
520
39k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
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Λѻ͏ࡍɺҎԼͷͷʹґଘ͍͚ͯ͠ͳ͍ɻ ΩʔͰॱং͚͞Εͨσʔλ ૠೖॱংͷอ࣋ ܾఆతͳ෮ॱং ෮ॲཧதʹՃ͞Εͨཁૉͷੜ