Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
業務中にサクッと書いたGo製ツールの話 at Gopher道場第二回LT大会
Search
Kazuki Higashiguchi
July 09, 2018
1
910
業務中にサクッと書いたGo製ツールの話 at Gopher道場第二回LT大会
業務中にサクッと書いたGo製ツールの話 at Gopher道場第二回LT大会での発表資料です
https://mercari.connpass.com/event/93427/
Kazuki Higashiguchi
July 09, 2018
Tweet
Share
More Decks by Kazuki Higashiguchi
See All by Kazuki Higashiguchi
Design of a Stateful system for Robust Deployment and Observability
hgsgtk
0
1.2k
A guide to joining operational work in your new DevOps team
hgsgtk
1
1.3k
HTTP Tunneling in Go
hgsgtk
0
1.3k
ブラウザ自動操作技術の深層へ、直接触れて学ぶ WebDriver と Chrome DevTools Protocol
hgsgtk
3
6.4k
HTTP Server on random available port in Go
hgsgtk
0
920
Agile Testingを夢見たテスト自動化 〜ATDDへの挑戦から始まる 1年間の試行錯誤〜 / dreaming agile testing at basebank
hgsgtk
14
7.6k
Create Go WebDriver client from scratch
hgsgtk
1
2.1k
PHPでWeb Driver Clientを自作する〜己の手でブラウザ操作自動化を完全理解する方法〜 / phpcon2021
hgsgtk
2
2.4k
振り返りを積み上げて自分たちのプラクティスとして昇華•体得していくための仕組みと考え方 / ScrumFestMikawa2021
hgsgtk
3
2.4k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Thoughts on Productivity
jonyablonski
67
4.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
What's in a price? How to price your products and services
michaelherold
243
12k
For a Future-Friendly Web
brad_frost
175
9.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Transcript
(PQIFSಓ-5େձ #"4&גࣜձࣾ ౦ޱᏻʢ!,IJHBTIJHVDIJʣ ۀதʹαΫοͱॻ͍ͨɺ (Pπʔϧͷ
ʢॻ͖ͨͯ͘ʣ ۀʹ(PΛͼࠐ·ͤͯ ͖ͨ
ࣗݾհ !,IJHBTIJHVDIJ౦ޱᏻ w ॴଐɿ#"4&גࣜձࣾ #"4&1SPEVDU%JWJTJPO αʔόαΠυΤϯδχΞ w (PQIFSಓظੜ w ͜Ε·Ͱͷओͳ͓ࣄɿ
w ʮ#"4&ʯͷܾࡁྖҬ w 1)1ɾ$BLF1)1ͷόʔδϣϯΞοϓ w #MPH w IUUQLIJHBTIJHBTIJIBUFOBCMPHDPN w (JUIVC w IUUQTHJUIVCDPN,IJHBTIJHVDIJ
γϯϓϧͳπʔϧΛྔ࢈ ࣮ͯ͠ફΛॏͶΔ
̍ɿ42-ੜ$-*
࡞ͬͨͷʢ̍ʣ w $47Λड͚औͬͯ42-Λग़ྗ͢Δ
࡞ͬͨͷʢ̍ʣ w എܠɿि࣍͘Β͍Ͱߦ͏ରԠ
࡞ͬͨͷʢ̍ʣ w Δ͜ͱ͜Ε͚ͩ
࡞ͬͨͷʢ̍ʣ w ੜͨ͠42-Λςετ͢Δ
࡞ͬͨͷʢ̍ʣ w ྑ͔ͬͨ͜ͱ w $-*ͱͯ͠.BD্Ͱಈ͔͢ʹखܰ w ޕલதͷ༨༟ͷ͋Δ࣌ؒʹୀ۶ͳ࡞ۀΛָ ʹͰ͖Δ w 42-ੜ෦Ͱͷ࠷ݶͷςετͰ҆৺
ɿ$47ϩʔυ$-*
࡞ͬͨͷʢʣ w $47Λड͚औͬͯτϥϯβΫγϣϯ࣮ߦ w ຊ൪%#ʹର͢Δ*/4&3561%"5&
࡞ͬͨͷʢʣ w $-*ύοέʔδͱͯ͠ɺVSGBWFDMJΛ͏ w IUUQTHJUIVCDPNVSGBWFDMJ w DPNNBOE͝ͱʹΦϓγϣϯࢦఆͰ͖Δ
࡞ͬͨͷʢʣ w ྑ͔ͬͨ͜ͱ w ΫϩείϯύΠϧͷັྗ w HP͕JOTUBMM͞Ε͍ͯͳ͍MJOVY্Ͱ࣮ߦ Մೳ w ʮόΠφϦஔ͚ͩ͘ͳΜͰʯ
GOOS=linux GOARCH=amd64 go build -o bin/importer importer.go
ɿ"1*ݕূ$-*
࡞ͬͨͷʢʣ w ֎෦͚"1*ͷݕূ༻$-* w "1* w IUUQTEFWFMPQFSTUIFCBTFJO w "VUI"VUIFOUJDBUJPO w
αϯϓϧίʔυ w IUUQTHJUIVCDPN,IJHBTIJHVDIJ HPTOJQQFUTUSFFNBTUFSCBTFBQJDMJ w 0"VUI w IUUQTHJUIVCDPNHPMBOHPBVUI
࡞ͬͨͷʢʣ w 0"VUIೝূͷ$-*࣮ͷͨΊʹʮ3FBM 8PSME)551ʯΛࢀߟʹ w IUUQTXXXPSFJMMZDPKQCPPLT
γϯϓϧͳπʔϧΛྔ࢈ ˠ৽αʔϏεͰͷ(Pಋ ೖݕ౼
(Pಋೖݕ౼ w ৽αʔϏεͰͷ(Pಋೖݕ౼ w "1*ϝΠϯͷαʔϏε w DTπʔϧɾXFCͰಉ͘͡(PͰΕΔ ͔ݕূத w αʔόαΠυɿ(P
w ϑϩϯτΤϯυɿ7VF+4 w 41"Ͱ443Ͱͳ͍ʮ63-͝ͱʹ )5.-Λฦ͢ʯܗࣜΛݕ౼
࡞ͬͯΔͷʢʣ w (PPHMF0"VUIೝূϕʔεͷཧը ໘αϯϓϧ w IUUQTHJUIVCDPN ,IJHBTIJHVDIJBVUIBENJOBQQ w 0"VUIೝূͰͷϩάΠϯɾϩάΞ τ
࡞ͬͯΔͷʢʣ w 5IF(P#MPH&SSPSIBOEMJOHBOE(P w ΤϥʔΛฦ͢ॲཧͷڞ௨Խ w )BOEMFSJOUFSGBDFΛ࣮͠BQQ&SSPS ܕΛฦ͢BQQ)BOEMFSΛ࡞Δ w
࡞ͬͯΔͷʢʣ ͦΕͧΕͷIBOEMFSɺΓʹBQQ&SSPS ܕΛฦ͢Α͏ʹ࣮ˠڞ௨Խ
࡞ͬͯΔͷʢʣ w ࢀߟ w 0"VUIೝূ w IUUQTHJUIVCDPN (PPHMF$MPVE1MBUGPSNHPMBOH TBNQMFTUSFFNBTUFSHFUUJOH TUBSUFECPPLTIFMG
w ೝՄ w ϩʔϧ͝ͱͷೝՄઃఆͳͲ w IUUQTHJUIVCDPNRPSBVUI
·ͱΊ
·ͱΊ w ࣄͷ߹ؒʹίπίπࠩ͠ࠐΉͱଉൈ͖ʹ ͳΔ w ࣌ʹϨϏϡʔͯ͠Β͑Δͱʢຊ൪%# ѻ͏ͳͲʣ w ࣄͰΔͱʮ࣮ϨϕϧʯͰ༷ʑͳ͜ͱ ʹ͍ͭͯߟ͑Δˠ
w ࠩ͠ࠐΈଓ͚Δͱ৽αʔϏεͰͷಋೖݕ౼ ͷػձ͕͖ͬͯͨʂ
#"4&גࣜձࣾ ౦ޱᏻʢ!,IJHBTIJHVDIJʣ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ