Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
自作 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
690
あまり知られていない MCP 仕様たち / MCP specifications that aren’t widely known
ktr_0731
0
660
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
480
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.4k
Other Decks in Technology
See All in Technology
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
310
今こそ知りたいAmplifyGen2
mkdev10
2
150
React Nativeでの OTA Updateって、 どう説明する?
ichiki1023
0
150
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
520
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
310
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
150
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
360
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
270
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
530
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
430
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
920
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
How to build a perfect <img>
jonoalderson
1
6.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Optimising Largest Contentful Paint
csswizardry
37
4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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