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 in Go: From development to distribution – M...
Search
GopherCon Russia
April 13, 2019
Programming
0
82
CLI in Go: From development to distribution – Michail Grachev
GopherCon Russia
April 13, 2019
Tweet
Share
More Decks by GopherCon Russia
See All by GopherCon Russia
Go Profiling from Bottom Up - Felix Geisendörfer
gopherconrussia
0
240
Learning Unsung Gotchas of Go - Rashmi Nagpal
gopherconrussia
1
290
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
150
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
160
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
190
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
260
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
150
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
140
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
140
Other Decks in Programming
See All in Programming
AI 開発合宿を通して得た学び
niftycorp
PRO
0
160
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
280
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
410
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
530
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
170
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
870
OTP を自動で入力する裏技
megabitsenmzq
0
120
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
370
Feature Toggle は捨てやすく使おう
gennei
0
190
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
450
Balancing Empowerment & Direction
lara
5
950
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Tell your own story through comics
letsgokoyo
1
850
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Typedesign – Prime Four
hannesfritz
42
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Transcript
/evrone. CLI IN FROM DEVELOPMENT TO DISTRIBUTION
Grachev Mikhail BACKEND, TEAMLEAD, DEVOPS mgrachev mgrachev
/evrone.
/evrone. PLAN ‣ Development CLI ‣ Libraries ‣ Problems ‣
Distribution CLI ‣ Instruments ‣ Release
/evrone. CLI
/evrone. Libraries
/evrone. spf13/cobra ‣ Code generation ‣ Nested commands ‣ Flags
and Arguments ‣ Intelligent suggestions ‣ Bash/Zsh-completion ‣ Hooks
/evrone. spf13/cobra
/evrone. CODE GENERATION spf13/cobra https://github.com/spf13/cobra/pull/817
/evrone. CODE GENERATION spf13/cobra
/evrone. COMMANDS spf13/cobra
/evrone. COMMANDS spf13/cobra
/evrone. FLAGS spf13/cobra
/evrone. ARGUMENTS spf13/cobra
/evrone. INTELLIGENT SUGGESTIONS spf13/cobra
/evrone. INTELLIGENT SUGGESTIONS spf13/cobra
/evrone. HOOKS spf13/cobra
/evrone. ‣ JSON, TOML, YAML, HCL, Java properties ‣ ENV
‣ Etcd и Consul ‣ Live watching spf13/viper
/evrone. EXAMPLE spf13/viper
/evrone. ENV spf13/viper
/evrone. AlecAivazis/survey
/evrone. PASSWORD AlecAivazis/survey
/evrone. CONFIRM AlecAivazis/survey
/evrone. SELECT AlecAivazis/survey
/evrone. avelino/awesome-go#configuration avelino/awesome-go#advanced-console-uis avelino/awesome-go#standard-cli
/evrone. Problems
/evrone. CROSS-PLATFORM PATHS
/evrone. CROSS-PLATFORM PATHS
/evrone. HOME DIRECTORY
/evrone. HOME DIRECTORY GO 1.12
/evrone. mitchellh/go-homedir
/evrone. FILE SYSTEM
/evrone. spf13/afero
/evrone. spf13/afero EXAMPLE
/evrone. spf13/afero TESTING
/evrone. Distribution
/evrone. HOMEBREW https://brew.sh
/evrone. REPOSITORY ‣ https://github.com/<USER>/homebrew-<APP_NAME> ‣ https://github.com/<USER>/<APP_NAME> https://brew.sh
/evrone. FORMULA https://brew.sh
/evrone. INSTALL https://brew.sh
/evrone. LINUX
/evrone. DEB / RPM
/evrone. SNAPCRAFT https://snapcraft.io
/evrone. SNAPCRAFT ▸ Support Linux distributions ▸ Isolation ▸ No
conflicts https://snapcraft.io
/evrone. SNAPCRAFT ▸ snap ▸ snapd ▸ snapcraft ▸ https://snapcraft.io/store
https://snapcraft.io
/evrone. SNAP https://snapcraft.io
/evrone. SNAP https://snapcraft.io
/evrone. SNAP https://snapcraft.io
/evrone. RESTRICTIONS ▸ Strict ▸ Classic ▸ Devmode https://snapcraft.io
/evrone. SNAP https://snapcraft.io
/evrone. SNAPCRAFT https://snapcraft.io
/evrone. SNAPCRAFT https://snapcraft.io
/evrone. SNAPCRAFT https://snapcraft.io
/evrone. SNAPCRAFT https://snapcraft.io
/evrone. SCOOP https://scoop.sh
/evrone. MANIFEST https://scoop.sh
/evrone. MANIFEST https://scoop.sh
/evrone. Release
/evrone. https://goreleaser.com goreleaser/goreleaser
/evrone. GORELEASER.YML goreleaser/goreleaser
/evrone. COMPILATION goreleaser/goreleaser
/evrone. ARCHIVING goreleaser/goreleaser
/evrone. S3 goreleaser/goreleaser
/evrone. HOMEBREW goreleaser/goreleaser
/evrone. SCOOP goreleaser/goreleaser
/evrone. goreleaser/nfpm
/evrone. SNAPCRAFT goreleaser/goreleaser
/evrone. RELEASE goreleaser/goreleaser
/evrone. goreleaser/godownloader https://install.goreleaser.com
/evrone. SUMMARY ▸ Development: cobra, viper, survey, go-homedir, afero ▸
Distribution: homebrew, snapcraft, scoop ▸ Release: goreleaser, nfpm, godownloader
/evrone. mgrachev mgrachev
[email protected]
https://github.com/mgrachev/gophercon-russia-2019