Slide 1

Slide 1 text

θϩ͔Β࢝ΊΔ .PEVMFT

Slide 2

Slide 2 text

ࣗݾ঺հ ໊લ༶໺ྑஐ ग़਎஍ෆ໌ ࡛ۄPSେ࿈ ֶ೥ֶ෦೥ ޷͖ͳϓϩάϥϛϯάݴޠ(P झຯےτϨ Ξχϝ өըFUD

Slide 3

Slide 3 text

໨࣍ 1.Go modules is Կ? 2.GOPATH؅ཧ͔Βͷมߋ఺ 3.Go modulesͰͷ؅ཧͷྲྀΕ

Slide 4

Slide 4 text

Go modules is Կʁ

Slide 5

Slide 5 text

Go modules (vgo) ͱ͸ • GoίϚϯυʹ౷߹͞ΕͨGoͷύέʔδ(όʔδϣ ϯ)؅ཧγεςϜ • ϧʔτʹgo.modϑΝΠϧΛ࣋ͭGoύοέʔδͷू ·Γ • Go1.11~ࢼݧతʹಋೖ

Slide 6

Slide 6 text

Go 1.10 Ҏલ͸… • GOPATHͷԼʹιʔείʔυΛ഑ஔͯ͠؅ཧ • GithubͳͲͷ֎෦Ͱެ։͞Ε͍ͯΔύο έʔδΛ go get ͢Δͱ$GOPATH/srcʹ഑ஔ ͞Εɺ͔ͦ͜Βͷ૬ରύεͰimportͯ͠؅ཧ

Slide 7

Slide 7 text

Go modules Ҏલ͸… Glide Dep

Slide 8

Slide 8 text

GOPATH؅ཧ͔Βͷมߋ఺

Slide 9

Slide 9 text

GOPATH֎͔Βύοέʔδ؅ཧ ͕ߦ͑ΔΑ͏ʹͳͬͨʂ

Slide 10

Slide 10 text

go mod ʹΑΔ؅ཧػೳʂ • go mod init ͰmoduleͷॳظԽ͕Մೳ • depͳͲͰ؅ཧ͍ͯ͠Δطଘͷmodule͸go mod initʹΑͬͯࣗಈతʹม׵͞ΕΔ • ੜ੒͞Εͨgo.modϑΝΠϧʹґଘؔ܎Λ௥Ճͯ͠ ؅ཧ͢Δ

Slide 11

Slide 11 text

go mod ʹΑΔ؅ཧ(ॳظԽ)

Slide 12

Slide 12 text

go mod ʹΑΔ؅ཧ(طଘ)

Slide 13

Slide 13 text

go mod ʹΑΔ؅ཧ(طଘ) $POWFSU

Slide 14

Slide 14 text

go mod ʹΑΔ؅ཧ(go.mod) • Goύοέʔδͷґଘؔ܎͸go.modʹ • exclude, replace, moduleσΟϨΫςΟϒ ͕༻ҙ͞Ε͍ͯΔ

Slide 15

Slide 15 text

go mod ʹΑΔ؅ཧ(go.mod) ϧʔτσΟϨΫτϦͷNPEVMF໊ SFRVJSFͨ͠NPEVMFΛஔ͖׵͑Δ ඞཁͳNPEVMF໊ͱWFSTJPOΛ௥Ճ

Slide 16

Slide 16 text

Minimal Version Selection • ৗʹબ୒Ͱ͖Δ͏ͪͰ࠷ݹͷόʔδϣϯͷ ύοέʔδΛબ୒ͯ͠ར༻͢Δ • ύοέʔδ͕Ξοϓσʔτ͞Εͯ΋ৗʹಉ ͡όʔδϣϯΛ࢖͍ଓ͚ΒΕΔ

Slide 17

Slide 17 text

Semantic Import Versioning

Slide 18

Slide 18 text

Go modules ؅ཧͷྲྀΕ

Slide 19

Slide 19 text

Go modules ؅ཧͷྲྀΕ 1. Project rootͰgo mod init module_name
 (depͳͲ࢖͍ͬͯΕ͹go mod init) 2. go getͳͲͰґଘؔ܎Λ௥Ճ 3. มߋ఺͸go.modͰॻ͖׵͑

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

·ͱΊ • Go modules͸Goެࣜͷύοέʔδόʔδϣϯ ؅ཧػೳ • Gopath֎Ͱιʔείʔυ؅ཧͰ͖Δ • Semantic Versioning, Minimal Version Selection ͷಋೖʹΑΓґଘؔ܎ͷҋΛ࿨Β͛ͯ͘ΕΔ 5IF(PQIFSDIBSBDUFSJTCBTFEPOUIF(PNBTDPUEFTJHOFECZ3FOÉF'SFODI