Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ゼロから始めるGo Modules

ゼロから始めるGo Modules

by yasu0327

kenjihanada

April 26, 2019
Tweet

More Decks by kenjihanada

Other Decks in Technology

Transcript

  1. go mod ʹΑΔ؅ཧػೳʂ • go mod init ͰmoduleͷॳظԽ͕Մೳ • depͳͲͰ؅ཧ͍ͯ͠Δطଘͷmodule͸go

    mod initʹΑͬͯࣗಈతʹม׵͞ΕΔ • ੜ੒͞Εͨgo.modϑΝΠϧʹґଘؔ܎Λ௥Ճͯ͠ ؅ཧ͢Δ
  2. Go modules ؅ཧͷྲྀΕ 1. Project rootͰgo mod init module_name
 (depͳͲ࢖͍ͬͯΕ͹go

    mod init) 2. go getͳͲͰґଘؔ܎Λ௥Ճ 3. มߋ఺͸go.modͰॻ͖׵͑
  3. ·ͱΊ • Go modules͸Goެࣜͷύοέʔδόʔδϣϯ ؅ཧػೳ • Gopath֎Ͱιʔείʔυ؅ཧͰ͖Δ • Semantic Versioning,

    Minimal Version Selection ͷಋೖʹΑΓґଘؔ܎ͷҋΛ࿨Β͛ͯ͘ΕΔ 5IF(PQIFSDIBSBDUFSJTCBTFEPOUIF(PNBTDPUEFTJHOFECZ3FOÉF'SFODI