Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
ʲ(PݴޠʳδΣωϦΫε Tomoki Ot a
Slide 2
Slide 2 text
ΞδΣϯμ any δΣωϦΫε 2
Slide 3
Slide 3 text
BOZ 3
Slide 4
Slide 4 text
BOZͱ ۭΠϯλʔϑΣΠεJOUFSGBDF\^ͷΤΠϦΞε 4
Slide 5
Slide 5 text
BOZͱ ͲΜͳܕͰอ࣋Ͱ͖Δ ˠաͳҰൠԽ ɹ੩తܕ͚ݴޠͷར͕ࣦΘΕΔ 5
Slide 6
Slide 6 text
BOZͱ ϝιουͷγάχνϟͰ͖Δ͚ͩ໌ࣔతʹ͢Δ BOZԿͷใ࣋ͨͳ͍ͷͰ جຊతʹΘͳ͍ 6
Slide 7
Slide 7 text
BOZΛ͏͖ͱ͖ ϚʔγϟϧؔͳͲ͋ΒΏΔܕΛ ड͚औͬͨΓฦͨ͠Γ͢Δඞཁ͕͋Δͱ͖ 7
Slide 8
Slide 8 text
BOZΛ͏͖ͱ͖ https://pkg.go.dev/encoding/json#Marshal encoding/jsonͷMarshal 8
Slide 9
Slide 9 text
BOZΛ͏͖ͱ͖ database/sqlͷQueryContext https://pkg.go.dev/database/sql#DB.QueryContext SELECT * FROM FOO WHERE id = ?
Slide 10
Slide 10 text
δΣωϦΫε 10
Slide 11
Slide 11 text
δΣωϦΫεΛ༻͠ͳ͍ྫ ࠨͷίʔυmapܕ͔ΒΩʔΛશͯग़ྗ͢Δɻ https://go.dev/play/p/lL6T8BDRE3D 11
Slide 12
Slide 12 text
δΣωϦΫεΛ༻͠ͳ͍ྫ NͷΩʔͱ͕ଞͷܕͰ͋ͬͨ߹ʹ ಈ͔ͳ͘ͳΔɻ ࠨN͕NBQTUSJOHʹͳͬͨͷͰ ίϯύΠϧΤϥʔ 12
Slide 13
Slide 13 text
BOZͰ࣮ͨ͠ྫ HFU,FZTɺBOZΛड͚ͱΓɺBOZΛฦ͢ɻ https://go.dev/play/p/9WgO0MVtYe_P 13
Slide 14
Slide 14 text
BOZͰ࣮ͨ͠ྫ HFU,FZTɺBOZΛड͚ͱΓɺBOZΛฦ͢ɻ (Pͷ੩తܕ͚ͷར͕ࣦΘΕΔ ܁Γฦ͠ͷίʔυ͕૿͑ΔՄೳੑ ˠ%3:ݪଇʹ͢Δ 14
Slide 15
Slide 15 text
DPNQBSBUJWFͰ࣮ͨ͠ྫ ΠϯλʔϑΣΠεಉ༷BOZʹΑΔແବͳநԽආ͚Δ͖ NBQͰɺWBSNNBQ<<>CZUF>JOUͷΑ͏ʹ LFZʹεϥΠεΛऔΔ͜ͱͰ͖ͳ͍ɻ 15
Slide 16
Slide 16 text
DPNQBSBUJWFͰ࣮ͨ͠ྫ 5DPNQBSBCMFͱɺΈࠐΈͷΠϯλʔϑΣΠεɻ 5DPNQBSBCMFͰൺֱՄೳͳͷΈҾʹड͚औΔ͜ͱ͕ՄೳʹͳΔɻ 16
Slide 17
Slide 17 text
DPNQBSBUJWFͰ࣮ͨ͠ྫ BOZܕͷΘΓʹDPNQBSBCMFΛ༻͍Δ https://go.dev/play/p/ENyS1GKu3IU 17
Slide 18
Slide 18 text
ಠࣗͷܕ੍Λఆٛ͢Δ https://go.dev/play/p/VHKfcvYQNua VOJPOTΛ༻͍Δͱ ΠϯλʔϑΣΠεͰಠࣗͷܕ੍Λ ఆٛ͢Δ͜ͱ͕Ͱ͖Δ 18
Slide 19
Slide 19 text
VOJPOTͱ ෳͷܕΛड͚औΕΔΑ͏ʹͰ͖Δ 19
Slide 20
Slide 20 text
ಠࣗͷܕ੍Λఆٛ͢Δ VOJPOTΛؚΉΠϯλϑΣʔεܕ੍Ͱ͔͑͠ͳ͍ɻ WBSYDVTUPN$POTUSBJOUͷΑ͏ʹͰ͖ͳ͍ɻ
Slide 21
Slide 21 text
δΣωϦΫεͷҙ ϝιουͰ༻Ͱ͖ͳ͍ɻ ؔՄೳ
Slide 22
Slide 22 text
δΣωϦΫεͷҙ TUSVDUͰ༻Ͱ͖Δɻ
Slide 23
Slide 23 text
δΣωϦΫεͷҙ ࠨɺಠࣗͷܕ੍ΛTUSVDUʹ࣋ͨͤͨྫ IUUQTHPEFWQMBZQ-Q/XP8P9 23
Slide 24
Slide 24 text
δΣωϦΫεͷҙ JOUFSGBDFʹTUSDVUΛFNCFEͰ͖Δ ͔͠͠ɺϑΟʔϧυʹΞΫηεͰ͖ͳ͍ɻ 24
Slide 25
Slide 25 text
δΣωϦΫεͷҙ ͜ΕίϯύΠϧΤϥʔ 25
Slide 26
Slide 26 text
δΣωϦΫεͷҙ δΣωϦΫε͋͘·Ͱܕ੍ͷΈɻ ࣮ࡍʹϑΟʔϧυʹΞΫηε͢Δ͜ͱͰ͖ͳ͍ɻ 26
Slide 27
Slide 27 text
dJOUWTJOU dJOUJOUΛϕʔεͱ͢ΔܕΛશͯड͚औΕΔ https://go.dev/play/p/E3kcU9-7TJ6 27
Slide 28
Slide 28 text
δΣωϦΫεΛ༻͖͢ͱ͖ w σʔλߏ FHόΠφϦπϦʔɺ࿈݁Ϧετɺώʔϓ w εϥΠεɺϚοϓɺ͓ΑͼҙͷλΠϓͷνϟωϧͰಈ࡞͢Δؔ w δΣωϦΫεΛͬͯৼΔ͍ΛநԽ͢Δ 28
Slide 29
Slide 29 text
εϥΠεɺϚοϓɺ͓ΑͼҙͷλΠϓͷνϟωϧͰಈ࡞͢Δؔ δΣωϦΫεΛ༻͖͢ͱ͖ 29
Slide 30
Slide 30 text
δΣωϦΫεΛͬͯৼΔ͍ΛநԽ͢Δ δΣωϦΫεΛ༻͖͢ͱ͖ 30
Slide 31
Slide 31 text
δΣωϦΫεΛ༻͖͢Ͱͳ͍ͱ͖ w ड͚औͬͨҾͷϝιουΛ༻͢Δͱ͖ w δΣωϦΫεΛ͏͜ͱͰίʔυ͕ෳࡶʹͳΔͱ͖ (Pͷ։ൃऀؒδΣωϦΫεͳ͠Ͱ͖ͬͯͨ 31
Slide 32
Slide 32 text
δΣωϦΫεΛ༻͖͢Ͱͳ͍ͱ͖ ड͚औͬͨҾͷϝιουΛ༻͢Δͱ͖ͷྫ 32