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言語】値レシーバ v.s. ポインタレシーバ
Search
Tomoki Ota
August 02, 2024
Programming
0
160
【Go言語】値レシーバ v.s. ポインタレシーバ
Go言語の値レシーバ とポインタレシーバの違いについて、解説しています。
【Qiita】
https://qiita.com/twrcd1227/items/9994b345e96eaafaafe4
Tomoki Ota
August 02, 2024
Tweet
Share
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
110
アーキテクチャとビジネスロジック
tomo1227
0
110
【Go言語】テスト
tomo1227
0
65
【Go言語】クロージャ
tomo1227
0
280
【Go言語】イテレータ
tomo1227
0
79
【Go言語】エラーハンドリング
tomo1227
0
68
AIに淘汰されないようにするには?
tomo1227
0
71
【Go言語】range
tomo1227
0
78
【Go言語】break
tomo1227
0
70
Other Decks in Programming
See All in Programming
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
1k
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
280
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
540
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
230
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
39
26k
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
200
gunshi
kazupon
1
130
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
920
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
SwiftUIで本格音ゲー実装してみた
hypebeans
0
530
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
480
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
79
How to train your dragon (web standard)
notwaldorf
97
6.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Paper Plane
katiecoart
PRO
0
44k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
The Language of Interfaces
destraynor
162
26k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
410
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
53
Transcript
Tomoki Ota ʲGoݴޠʳ Ϩγʔό V.S. ϙΠϯλϨγʔό
Ϩγʔό ϙΠϯλϨγʔό Ϩγʔό͕ϙΠϯλͰͳ͚ΕͳΒ͍ͱ͖ Ϩγʔό͕ϙΠϯλͰ͋Δ͖ͱ͖ Ϩγʔό͕Ͱͳ͚ΕͳΒ͍ͱ͖ Ϩγʔό͕Ͱ͋Δ͖ͱ͖ defer ·ͱΊ ΞδΣϯμ 2
Ϩγʔό 3
Ϩγʔόͷྫ 4
Ϩγʔόͷྫ 5
ϙΠϯλϨγʔό 6
ϙΠϯλϨγʔόͷྫ 7
ϙΠϯλϨγʔόͷྫ 8
Ϩγʔό͕ϙΠϯλͰ ͳ͚ΕͳΒ͍ͱ͖ 9
ϝιου͕ϨγʔόΛมߋ͢Δඞཁ͕͋Δͱ͖ ϝιουͷϨγʔό͕ίϐʔͰ͖ͳ͍ϑΟʔϧυΛؚΉͱ͖ Ϩγʔό͕ϙΠϯλͰͳ͚ΕͳΒ͍ͱ͖ 10
Ϩγʔό͕ϙΠϯλͰͳ͚ΕͳΒ͍ͱ͖ 11
Ϩγʔό͕ϙΠϯλͰ ͳ͚ΕͳΒ͍ͱ͖ 12
Ϩγʔό͕େ͖ͳͷͱ͖ → ͩ͠ͱίϐʔ͞Εͯ͠·͏ Ϩγʔό͕ϙΠϯλͰ͋Δ͖ͱ͖ 13
Ϩγʔό͕ϙΠϯλͰ ͳ͚ΕͳΒ͍ͱ͖ 14
ϨγʔόͷෆมੑΛڧ੍͢Δඞཁ͕͋Δͱ͖ Ϩγʔό͕Ϛοϓɺؔɺνϟωϧͷͱ͖ Ϩγʔό͕Ͱͳ͚ΕͳΒ͍ͱ͖ 15
Ϩγʔό͕ϙΠϯλͰ ͳ͚ΕͳΒ͍ͱ͖ 16
Ϩγʔό͕ɺมߋ͢Δඞཁͷͳ͍εϥΠεͷͱ͖ Ϩγʔό͕খ͞ͳྻɺՄมͳϑΟʔϧυΛ࣋ͨͣඞવతʹ ܕͰ͋Δtime.Time ͷΑ͏ͳߏମͷͱ͖ Ϩγʔό͕ intɺ f loat64ɺstring ͱ͍ͬͨجຊσʔλܕͷͱ͖ Ϩγʔό͕Ͱ͋Δ͖ͱ͖
17
Ϩγʔό͕Ͱ͋Δ͖ͱ͖ 18
defer 19
ϝιουʹରͯ͠ɺdeferΛ༻͢Δͱ͖ɺϨ γʔό͙͢ʹධՁ͞ΕΔ defer 20
defer 21
defer 22
·ͱΊ 23
ਖ਼ͳཧ༝͕ͳ͍ݶΓɺϨγʔόΛ༻͢Δ ͨͩ͠ɺ໎ͬͨͱ͖ϙΠϯλϨγʔόΛ͏ํ͕͍͍ deferͰϝιουΛ͏࣌ɺϙΠϯλΛ͘͢͠ɺ Ϋϩʔδϟ෦Ͱݺͼग़͢ͱଈ࣌ධՁ͞Εͳ͘ͳΔ ·ͱΊ 24