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
Tomoki Ota ʲGOݴޠʳ ϓϩδΣΫτߏͱύοέʔδ
Slide 2
Slide 2 text
TL;DR 2
Slide 3
Slide 3 text
GOʹ1ͭͷදతͳ ϨΠΞτ͕͋Δ 3
Slide 4
Slide 4 text
https://github.com/golang-standards/project-layout 4
Slide 5
Slide 5 text
͔͠͠ɺ͜Εඇެࣜ Russ-Cox(Goͷϝϯςφʔͷ̍ਓ)൷͍ͯͨ͠ 5
Slide 6
Slide 6 text
https://go.dev/doc/modules/layout 6
Slide 7
Slide 7 text
Project-layoutͷσΟϨΫτϦߏ Project-layoutͷҙ γϯϓϧͳύοέʔδ γϯϓϧͳίϚϯυ APIαʔόͷϓϩδΣΫτߏ ύοέʔδͷཻ ϢʔςΟϦςΟύοέʔδ ύοέʔδͷ໊લͷিಥ ΞδΣϯμ 7
Slide 8
Slide 8 text
PROJECT-LAYOUT 8
Slide 9
Slide 9 text
PROJECT-LAYOUTͷσΟϨΫτϦߏ 9
Slide 10
Slide 10 text
project-layout ɺGoެࣜͷϨΠΞτͰͳ͍ͷͰɺඞͣ ͠कΒͳ͍ͱ͍͚ͳ͍نͰͳ͍ɻ src࡞͍͚ͬͯͳ͍ɻsrcΛ͏ͷJavaͷελΠϧͳͷ ͰɺGoͰ༻͍͚ͯ͠ͳ͍ɻ·ͨɺsrcҰൠత͗͢Δɻ PROJECT-LAYOUTͷҙ 10
Slide 11
Slide 11 text
ެࣜͷϓϩδΣΫτߏ 11
Slide 12
Slide 12 text
γϯϓϧͳύοέʔδ 12
Slide 13
Slide 13 text
γϯϓϧͳύοέʔδ 13
Slide 14
Slide 14 text
γϯϓϧͳύοέʔδ ϑΝΠϧΛ͚Δ͜ͱՄೳ 14
Slide 15
Slide 15 text
fooίϚϯυͷ࡞ γϯϓϧͳίϚϯυ 15
Slide 16
Slide 16 text
fooίϚϯυͷ࡞ γϯϓϧͳίϚϯυ Client 16
Slide 17
Slide 17 text
fooίϚϯυͷ࡞ γϯϓϧͳίϚϯυ ⭕ ❌ 17
Slide 18
Slide 18 text
APIαʔό 18
Slide 19
Slide 19 text
ύοέʔδ 19
Slide 20
Slide 20 text
ϢʔςΟϦςΟύοέʔδ utils, common, base, shared ͷΑ͏ͳ ڞ༗ύοέʔδ࡞ͨ͠Βμϝ🙅 20
Slide 21
Slide 21 text
ϢʔςΟϦςΟύοέʔδ 21
Slide 22
Slide 22 text
ϢʔςΟϦςΟύοέʔδ 22
Slide 23
Slide 23 text
ϢʔςΟϦςΟύοέʔδ 23
Slide 24
Slide 24 text
ϢʔςΟϦςΟύοέʔδ ҙຯͷͳ͍ύοέʔδ໊͚͍ͭͯ ͚ͳ͍ɻ·ͨɺύοέʔδͷ໊લԿ ΛؚΉ͔Ͱͳ͘ɺԿΛఏڙ͢Δ͔Ͱ ܾΊΔɻ 24
Slide 25
Slide 25 text
ύοέʔδ໊ͷিಥ 25
Slide 26
Slide 26 text
ύοέʔδ໊ͷিಥ ΤΠϦΞεͷ༻ 26
Slide 27
Slide 27 text
ύοέʔδ໊ͷিಥ ύοέʔδҎ֎ʹɺ ΈࠐΈؔͱมͷ໊લͷিಥආ͚Δɻ(copy()ͳͲ) 27