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で作るCLIツール
Search
Akifumi Tominaga
December 03, 2018
Programming
1
350
GOで作るCLIツール
Go言語で作ったGoogle Cloud Pub/Sub のCLIツールの紹介です。
Akifumi Tominaga
December 03, 2018
Tweet
Share
More Decks by Akifumi Tominaga
See All by Akifumi Tominaga
Firebase Remote Config を利用した Feature Flags の導入
decoch
0
150
Firebase Performance を利用したアプリの起動時間高速化
decoch
0
120
依存関係を静的解析しよう
decoch
2
380
CircleCIを使って 「完全サーバーレス運用」を 実現した話
decoch
2
460
DBFlute Introで 気軽にDBコメント変更
decoch
0
120
DBFlute-intro
decoch
0
58
Other Decks in Programming
See All in Programming
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
200
Duke on CRaC with Jakarta EE
ivargrimstad
0
150
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
160
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
260
GoとPHPのインターフェイスの違い
shimabox
2
220
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
260
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
360
コードを読んで理解するko build
bells17
1
120
Jakarta EE meets AI
ivargrimstad
0
680
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
150
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
読まないコードリーディング術
hisaju
0
120
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
GitHub's CSS Performance
jonrohan
1030
460k
Docker and Python
trallard
44
3.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
We Have a Design System, Now What?
morganepeng
51
7.4k
Designing for Performance
lara
605
68k
Facilitating Awesome Meetings
lara
53
6.3k
RailsConf 2023
tenderlove
29
1k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Transcript
GOͰ࡞ΔCLIπʔϧ 2018/12/03 Gopherಓ @decoch
ࣗݾհ • ࢯ໊ : Ӭ ߊ࢙ @decoch • Github: @decoch
• Twitter: @decoch718 • Smart phone app engineer & Server side • ར༻ݴޠ • Java -> Swift -> Kotlin -> Golang • Open source • DBFlute Intro(https://github.com/dbflute/dbflute-intro)
Agenda • ࡞ͨ͠πʔϧ • ࡞͖͔͚ͬͨͬ • ՝ͱղܾࡦ • λεΫ •
·ͱΊ
࡞ͨ͠πʔϧ
࡞ͨ͠πʔϧ $-*
࡞ͨ͠πʔϧ $-*
࡞ͨ͠πʔϧ
͖͔͚ͭͬͨͬ͘ • GCP + Golnag Ͱ৽نϓϩμΫτΛ։ൃ • Pub/SubͷSubscriptionsͷఆٛΛίʔυཧ ͍ͨ͠ •
ϩʔΧϧͷΤϛϡϨʔλͰςετ͍ͨ͠
࡞͖͔͚ͬͨͬ
࡞͖͔͚ͬͨͬ IUUQTDMPVEHPPHMFDPNQVCTVCEPDTFNVMBUPS IMKBVTJOH@UIF@FNVMBUPS
՝ͱղܾࡦ • ՝ • EmulatorͰͷςετ͕؆୯Ͱͳ͍ • GUIͰPub/SubͷઃఆΛՃ͢Δͱݕূͱຊ൪ͰζϨ͕ى͖ΔՄೳੑ͕ ͋Δ • ղܾࡦ
• ϑΝΠϧΛಡΈࠐΜͰPub/SubʹઃఆΛө͢Δ • Pub/SubͷઃఆΛಡΈࠐΈϑΝΠϧͱͯ͠ు͖ग़͢ • ϑΝΠϧͷϑΥʔϚοτyamlܗࣜͱ͢Δ
λεΫ • Pub/Subͷੜͱऔಘ͔͠ରԠ͍ͯ͠ͳ͍ • SubscriptionͷPullܕʹରԠͰ͖͍ͯͳ͍
Appendix • ࢀߟʹ͍͖ͤͯͨͩ͞·ͨ͠ • nshmura/dsio: https://github.com/ nshmura/dsio • ༻ϥΠϒϥϦ •
urfave/cli: https://github.com/urfave/cli
·ͱΊ • Pub/SubͷΫϥΠΞϯτΛ࡞ͬͨ • GolangͩͱCLIπʔϧ͕؆୯ʹ࡞Ͱ͖Δ • ·ͩπʔϧ͕͍ͬͯͳ͍ͷͰGolangͷί ϛϡχςΟʹߩݙͰ͖Δʁ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠