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
78
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
220
Learning Unsung Gotchas of Go - Rashmi Nagpal
gopherconrussia
1
280
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
140
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
140
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
170
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
230
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
130
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
120
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
130
Other Decks in Programming
See All in Programming
Gleamという選択肢
comamoca
6
760
関数型まつりレポート for JuliaTokai #22
antimon2
0
150
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
400
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
190
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
160
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
1
120
ニーリーにおけるプロダクトエンジニア
nealle
0
490
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
890
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
Is Xcode slowly dying out in 2025?
uetyo
1
190
XP, Testing and ninja testing
m_seki
3
190
WindowInsetsだってテストしたい
ryunen344
1
190
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
940
Embracing the Ebb and Flow
colly
86
4.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
How to Ace a Technical Interview
jacobian
277
23k
KATA
mclloyd
29
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
Fireside Chat
paigeccino
37
3.5k
Rails Girls Zürich Keynote
gr2m
94
14k
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