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
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my...
Search
ktr
May 29, 2018
Technology
2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
自作 CLI ツールのワークフローとそれを支える技術 / the workflow of my CLI tool and technologies which supports it
ktr
May 29, 2018
More Decks by ktr
See All by ktr
詳解 MCP Go SDK / MCP Go SDK
ktr_0731
3
670
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
640
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.7k
激動の一年を通じて見えてきた「技術でリードする」ということ
ktr_0731
8
11k
Monorepo における Go テストの差分実行 / Running Differential Go Tests in a Monorepo
ktr_0731
1
460
Designing libraries in Go way
ktr_0731
6
1.6k
Go Modules and Proxy Walkthrough
ktr_0731
8
27k
ソフトウェアの複雑さに立ち向かう技術 / Tackling software complexity
ktr_0731
0
250
Fuzzy finder as a Go library
ktr_0731
3
6.3k
Other Decks in Technology
See All in Technology
My broken English still works: speaking at global OSS events
naruoga
0
110
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
5.9k
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
850
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
340
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
320
Bits AI を制するものは Datadog を制す / The player that controls Bits AI, controls Datadog
kaminashi
0
120
AIのためのEthernet技術動向 (SerDes)
markunet
1
200
Kiro Crew入門 - 常駐エージェントの仕組みと使いどころ / Intro to Kiro Crew
k_adachi_01
1
370
2026-08-05 IBM Z開発最前線!IBM Bob Premium Package for Zって何がすごいの?
yutanonaka
0
260
20260804_Q4AzureUpdateBite_FabricDataAgentの精度を高める設計.pdf
matayuuu
1
140
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.6k
ブラウザ研修 2026
recruitengineers
PRO
6
1.1k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
The Language of Interfaces
destraynor
162
27k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
400
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
240
Statistics for Hackers
jakevdp
799
230k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Marketing to machines
jonoalderson
1
5.7k
For a Future-Friendly Web
brad_frost
183
10k
The Curse of the Amulet
leimatthew05
2
14k
Transcript
at u-aizu LT spring ࣗ࡞ CLI πʔϧͷϫʔΫϑϩʔͱ ͦΕΛࢧ͑Δٕज़
!LUS@ LUSɺΩλϩʔ ձେֶT XIPBNJ
!LUS@ LUSɺΩλϩʔ ձେֶT ແ৬ XIPBNJ
None
None
None
$-*πʔϧͷ ϝϯςφϯεͷ
w ΞοϓσʔτΛ͑Δखஈ͕ͳ͍ w खಈͰ ܧଓతʹϦϦʔε͢Δίετ ϝϯςφαΠυ
w ࠷৽͔Ͳ͏͔͔Βͳ͍ w Ξοϓσʔτ͕खؒ ϢʔβαΠυ
w (PQIFSɺαʔόΤϯδχΞҎ֎ Ϣʔβͱͯ͠ఆ w ࠷దͳΠϯετʔϧํ๏Λఏڙ͍ͨ͠ LUSFWBOT
w ϢʔβΠϯετʔϧํ๏ΛબΜͰΠϯετʔϧ w ϢʔβΞοϓσʔτΛߦ͏͔ΛબͿ͚ͩ w ΞοϓσʔτΛ֬ೝͤ͞ͳ͍ w Ξοϓσʔτํ๏Λߟ͑ͤ͞ͳ͍ ΄Μͱ͏ʹඞཁͳ͜ͱ
˞ Ҏ߱ͷϑϩʔ(PϓϩδΣΫτΛ લఏͱ͍ͯ͠·͢
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump
w ϓϩδΣΫτͷόʔδϣχϯά w $*ͱ࿈ܞͨ͠ϏϧυɺϦϦʔε w πʔϧͷࣗಈతͳΞοϓσʔτ $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB
commit fire create VTFS update NBJOUBJOFS OFXWFSTJPO bump
$* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS update
NBJOUBJOFS OFXWFSTJPO bump LUSHPTFNWFS
ηϚϯςΟοΫόʔδϣχϯά cmd/bumpʹΑΔߋ৽ LUSHPTFNWFS var v = semver.MustParse("0.3.1") $ bump patch
main.go package main ... var v = semver.MustParse("0.3.2") CLI main.go
"45ม͠ɺόʔδϣϯΛ୳͢ ͜ͱͰɺ҆શʹॻ͖͕͑Մೳ LUSHPTFNWFS *ast.CallExpr { . Fun: *ast.SelectorExpr { .
. X: *ast.Ident { . . . NamePos: meta.go:10:12 . . . Name: "semver" . . } . . Sel: *ast.Ident { . . . NamePos: meta.go:10:19 . . . Name: "MustParse" . . } . } . Lparen: meta.go:10:28 . Args: []ast.Expr (len = 1) { . . 0: *ast.BasicLit { . . . ValuePos: meta.go:10:29 . . . Kind: STRING . . . Value: "\"0.3.1\"" . . } . } . Ellipsis: - . Rparen: meta.go:10:36 }
NJUDIFMMIHPYUDOLTNHIS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
ෳϓϥοτϑΥʔϜ͚ʹϏϧυ (JU)VC3FMFBTFTͷ NJUDIFMMIHPY UDOLTNHIS mitchellh/gox gox -osarch "$OSARCH" . for
f in *; do mv "$f" evans tar cvzf "$f.tar.gz" evans rm -f evans done tcnksm/ghr git tag "$VERSION" git push origin "$VERSION" ghr "$VERSION" pkg
LUSHPVQEBUFS $* SFQPTJUPSZ (JU)VC3FMFBTFT )PNFCSFXGPSNVMB commit fire create VTFS
update NBJOUBJOFS OFXWFSTJPO bump
w ࣗಈΞοϓσʔτ༻ϥΠϒϥϦ w ҙͷखஈ .FBOT ͰΞοϓσʔτ͕Մೳ LUSHPVQEBUFS
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.NewMeans( github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
var current = semver.MustParse("0.2.0") func main() { means, _ :=
updater.SelectAvailableMeansFrom( context.Background(), brew.HomebrewMeans("ktr0731/evans", "evans"), github.GitHubReleaseMeans("ktr0731", "evans", nil), ) u := updater.New(current, means) updatable, new, _ := u.Updatable(context.Background()) if updatable { _ = u.Update(context.Background()) fmt.Printf("updated: %s ! %s\n", current, new) } }
$-*Ϟʔυ 3&1-Ϟʔυ autoUpdate USVF ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτඇදࣔ ඇಉظΞοϓσʔτ autoUpdate GBMTF
ΞοϓσʔτΛ ߦΘͳ͍ ϓϩϯϓτදࣔ ಉظΞοϓσʔτ
None
w HPTFNWFSʹΑΔόʔδϣχϯά w HPYHISʹΑΔϏϧυɺϦϦʔε w HPVQEBUFSʹΑΓɺΞοϓσʔτखॱʹ ؔ͢ΔࣝΛϢʔβ͔Βશʹ ·ͱΊ
w IUUQTNPUFNFOIBUFOBCMPHDPNFOUSZ HPHPCVNQWFSTJPOJOH w IUUQTEFFFFUDPNXSJUJOHHIS w IUUQTTZGNIBUFOBCMPHDPNFOUSZ ࢀߟ
w (P-PHPJT$PQZSJHIU5IF(P"VUIPST "MMSJHIUTSFTFSWFE $PQZSJHIU