Slide 1

Slide 1 text

CyberAgent & Merpay BackendEngineer’s Go ಉ miniConf Go Modules and Proxy 
 Walkthrough

Slide 2

Slide 2 text

w LUS Ωλϩʔɺ!LUS@ w ϝϧϖΠ৽ଔ
 όοΫΤϯυΤϯδχΞ w $PEF1BZNFOU5FBN XIPBNJ

Slide 3

Slide 3 text

CyberAgent & Merpay BackendEngineer’s Go ಉ miniConf Go Modules and Proxy 
 Walkthrough

Slide 4

Slide 4 text

8IBUJT(P.PEVMFT

Slide 5

Slide 5 text

w (PͷόʔδϣχϯάγεςϜ w 3VTT$PYͷ(P7FSTJPOJOHͱWHPͰొ৔ w (P͔Βݶఆతͳαϙʔτ (P.PEVMFT

Slide 6

Slide 6 text

w ϦϙδτϦͷϞδϡʔϧԽ w ηϚϯςΟοΫόʔδϣχϯά w HPNPEʹΑΔґଘ؅ཧ w HPTVNʹΑΔνΣοΫαϜͷ؅ཧ (P.PEVMFTͷಛ௃

Slide 7

Slide 7 text

DSD UMW NQN NQNKQRS UPPMT ϦϙδτϦͷϞδϡʔϧԽ go.mercari.io/go-emv-code . ᵓ── crc16 ᵓ── mpm │ └── jpqr ᵓ── tlv └── tools

Slide 8

Slide 8 text

DSD UMW NQN NQNKQRS UPPMT HPNPEUJEZ go.mercari.io/go-emv-code . ᵓ── crc16 ᵓ── go.mod ᵓ── go.sum ᵓ── mpm │ └── jpqr ᵓ── tlv └── tools go.mercari.io/go-emv-code

Slide 9

Slide 9 text

DSD go.mercari.io/go-emv-code UMW NQN NQNKQRS UPPMT • v0.1.1 • v0.1.0 Ϟδϡʔϧ୯ҐͰόʔδϣχϯά "v" ͸͚ͭΔඞཁ͕͋Δʂ

Slide 10

Slide 10 text

WQBDLBHFT go.mercari.io/go-emv-code/v2 • v2.0.0 ޙํޓ׵ੑ͕อͯͳ͍࣌

Slide 11

Slide 11 text

w (PNPEVMFTΛ༗ޮԽ͢Δ͔Ͳ͏͔ઃఆͰ͖Δ w PO༗ޮԽ w P⒎ແޮԽ w BVUP σϑΥϧτ w (01"5)TSDͷ֎͔ͭHPNPE͕͋Ε͹༗ޮ (0.0%6-&

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

w (PͰ΋BVUP͕σϑΥϧτͷ·· w ͨͩ͠ɺ(01"5)TSDͷதͰ͋ͬͯ΋HPNPE͕
 ͋Ε͹༗ޮԽ͞ΕΔ (0.0%6-& (P

Slide 14

Slide 14 text

w (PNPEVMFT͕༗ޮͩͱHPHFUͷڍಈ͕มΘΔ w (01"5)TSDʹ഑ஔ͞Εͳ͘ͳΔ w HPNPEͱHPTVNͷॻ͖׵͑ w όʔδϣϯͳͲΛࢦఆͯ͠ͷऔಘ NPEVMFBXBSFHPHFU

Slide 15

Slide 15 text

$ export GO111MODULE=on $ go get go.mercari.io/go-emv-code # latest (v0.1.1) $ go get go.mercari.io/[email protected] # version $ go get go.mercari.io/go-emv-code@670be75 # commit hash $ go get -u=patch go.mercari.io/go-emv-code # v0.1.1 NPEVMFBXBSFHPHFU

Slide 16

Slide 16 text

(P.PEVMF&DPTZTUFN

Slide 17

Slide 17 text

w .PEVMF*OEFY w .PEVMF"VUIFOUJDBUJPO w .PEVMF.JSSPST w .PEVMF1SPYZ (P.PEVMF&DPTZTUFN

Slide 18

Slide 18 text

w ύϒϦοΫʹར༻ՄೳͳϞδϡʔϧΛ
 ΫΤϦΛ࢖ͬͯݕࡧͰ͖ΔαʔϏε w ࣮૷͸JOEFYHPMBOHPSHͷΈ .PEVMF*OEFY

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

w (01"5)HPHFU͸தؒऀ߈ܸʹରͯ͠੬ऑ .PEVMF"VUIFOUJDBUJPO

Slide 22

Slide 22 text

w (01"5)HPHFU͸தؒऀ߈ܸʹରͯ͠੬ऑ w NPEVMFBXBSFHPHFUͰ͸HPTVNͰ
 ਖ਼͍͠Ϟδϡʔϧ͔ΛݕূՄೳʹʂ .PEVMF"VUIFOUJDBUJPO

Slide 23

Slide 23 text

w Ҏલʹऔಘͨ͠ϞδϡʔϧͷνΣοΫαϜΛอ࣋ HPTVNͷ໰୊

Slide 24

Slide 24 text

w Ҏલʹऔಘͨ͠ϞδϡʔϧͷνΣοΫαϜΛอ࣋ ॳճऔಘ࣌ʹਅਖ਼ੑΛ֬ೝͰ͖ͳ͍ HPTVNͷ໰୊

Slide 25

Slide 25 text

w ͋ΒΏΔϞδϡʔϧͷνΣοΫαϜΛ
 ू໿͢ΔαʔϏε w ࣮૷͸TVNHPMBOHPSHͷΈ (PDIFDLTVNEBUBCBTF TVNEC

Slide 26

Slide 26 text

w Ϟδϡʔϧͷίʔυ΍νΣοΫαϜͷΩϟογϡΛߦ͏ w ಛఆͷαʔόͷՄ༻ੑ΍ϨΠςϯγʹӨڹ͞ΕΔͷΛ๷͙ .PEVMF.JSSPST

Slide 27

Slide 27 text

w Ϟδϡʔϧͷίʔυ΍νΣοΫαϜͷΩϟογϡΛߦ͏ w ಛఆͷαʔόͷՄ༻ੑ΍ϨΠςϯγʹӨڹ͞ΕΔͷΛ๷͙ w Ұ౓Ωϟογϡ͞ΕͨϞδϡʔϧ͸جຊతʹ࡟আ͞Εͳ͍ .PEVMF.JSSPST

Slide 28

Slide 28 text

w Ϟδϡʔϧͷίʔυ΍νΣοΫαϜͷΩϟογϡΛߦ͏ w ಛఆͷαʔόͷՄ༻ੑ΍ϨΠςϯγʹӨڹ͞ΕΔͷΛ๷͙ w Ұ౓Ωϟογϡ͞ΕͨϞδϡʔϧ͸جຊతʹ࡟আ͞Εͳ͍ w ϦϙδτϦ࡟আʹରॲ͢ΔͨΊ FHHPCJOEBUB .PEVMF.JSSPST

Slide 29

Slide 29 text

w .PEVMFQSPYZQSPUPDPMΛ࣮૷͢ΔαʔϏε w QSPYZHPMBOHPSHɺ"UIFOTͳͲ w (P͔Β͸HPίϚϯυ͸ΦϦδϯαʔόͰ ͸ͳ͘QSPYZ΁ίʔυΛऔಘ͠ʹ͍͘ .PEVMF1SPYZ

Slide 30

Slide 30 text

w (&5(01309:NPEVMF!WMJTU w (&5(01309:NPEVMF!WWFSTJPOJOGP w (&5(01309:NPEVMF!WWFSTJPONPE w (&5(01309:NPEVMF!WWFSTJPO[JQ .PEVMFQSPYZQSPUPDPM

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

(01309:ͱ(046.%# $ export GOPROXY="https://proxy.golang.org,direct" # default $ export GOPROXY="off" # disable proxies $ export GOSUMDB="sum.golang.org" # default $ export GOSUMDB="off" # disable sumdb

Slide 33

Slide 33 text

HP ίϚϯυ QSPYZ QSPYZHPMBOHPSH TVNEC TVNHPMBOHPSH JOEFY JOEFYHPMBOHPSH NPEVMFͷऔಘ DIFDLTVNͷऔಘ (P%PD NPEVMF৘ใͷऔಘ (JU)VC #JUCVDLFU FUD

Slide 34

Slide 34 text

w JOEFYͳ͠ w TVNECҰ෦ͷΈHPMBOHPSHYNPETVNECʹଘࡏ w NJSSPSͳ͠ w QSPYZͳ͠ ֤αʔϏεͷެ࣮ࣜ૷

Slide 35

Slide 35 text

w ͍ͣΕHPMBOHPSHYNPEͰެ։͞Ε͍ͯ͘ w ͦΕͧΕͷ࣮૷͸DNEHPJOUFSOBMҎԼͰ
 ։ൃ͞Ε͍ͯΔ w (P·Ͱʹ͢΂ͯެ։͞Εͦ͏ʜʁ ֤αʔϏεͷެ࣮ࣜ૷

Slide 36

Slide 36 text

1SJWBUF.PEVMFT

Slide 37

Slide 37 text

1SJWBUF.PEVMFT HP ίϚϯυ ϓϥΠϕʔτ
 ϦϙδτϦ QSPYZ QSPYZHPMBOHPSH

Slide 38

Slide 38 text

1SJWBUF.PEVMFT HP ίϚϯυ ϓϥΠϕʔτ
 ϦϙδτϦ QSPYZ QSPYZHPMBOHPSH ❌

Slide 39

Slide 39 text

w (PͰ͸σϑΥϧτͰQSPYZHPMBOHPSH
 Λܦ༝͢Δ w ηΩϡϦςΟతͳ໰୊͔ΒϞδϡʔϧͷऔಘʹ
 ࣦഊͨ͠৔߹͸ίϚϯυͷ࣮ߦ͕ࢭ·Δ 1SJWBUF.PEVMFT

Slide 40

Slide 40 text

w (PͰ͸σϑΥϧτͰQSPYZHPMBOHPSH
 Λܦ༝͢Δ w ηΩϡϦςΟతͳ໰୊͔ΒϞδϡʔϧͷऔಘʹ
 ࣦഊͨ͠৔߹͸ίϚϯυͷ࣮ߦ͕ࢭ·Δ w ୯७ʹ(PͷόʔδϣϯΛ্͛Δ͚ͩͩͱϏϧυ͕௨Βͳ͘ͳΔ 1SJWBUF.PEVMFT

Slide 41

Slide 41 text

(0/01309: $ export GONOPROXY="github.com/ktr0731/priv-mod" $ go get github.com/ktr0731/priv-mod

Slide 42

Slide 42 text

w ·ͩ೉ͦ͠͏ʜ w ެࣜͷ࣮૷͕ͳ͍ w #BTJDೝূ͔͠࢖͑ͳ͍ 1SPYZͷηϧϑϗετ

Slide 43

Slide 43 text

·ͱΊ

Slide 44

Slide 44 text

w (0.0%6-&͸(PͰ΋มΘΒͣBVUP w (PNPEVMFT͕༗ޮͩͱHPHFUͷڍಈ͕มΘΔ w ηϚϯςΟοΫόʔδϣχϯάͰόʔδϣχϯά (P.PEVMFT

Slide 45

Slide 45 text

w JOEFYΫΤϦʹΑΔϞδϡʔϧͷݕࡧ w TVNEC͋ΒΏΔϞδϡʔϧͷνΣοΫαϜΛू໿ w NJSSPSϞδϡʔϧ΍νΣοΫαϜͷΩϟογϡ w QSPYZHPίϚϯυ΁Ϟδϡʔϧ৘ใΛఏڙ (P.PEVMF&DPTZTUFN

Slide 46

Slide 46 text

w QSPYZHPMBOHPSH͸ϓϥΠϕʔτϦϙδτϦ΁
 ΞΫηεͰ͖ͳ͍ w (0/01309:Λద੾ʹઃఆ͢Δ 1SJWBUF.PEVMFT

Slide 47

Slide 47 text

w(P7FSTJPOJOHIUUQTSFTFBSDITXUDIDPNWHP w.PEVMFT8JLJIUUQTHJUIVCDPNHPMBOHHPXJLJ.PEVMFT w(P.PEVMFTJOIUUQTCMPHHPMBOHPSHNPEVMFT w1SPQP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