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
75
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
190
Learning Unsung Gotchas of Go - Rashmi Nagpal
gopherconrussia
1
250
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
120
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
110
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
130
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
180
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
100
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
94
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
99
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
100
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Click-free releases & the making of a CLI app
oheyadam
2
110
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
4
640
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Realtime API 入門
riofujimon
0
150
C++でシェーダを書く
fadis
6
4.1k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Designing for humans not robots
tammielis
250
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The World Runs on Bad Software
bkeepers
PRO
65
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
For a Future-Friendly Web
brad_frost
175
9.4k
A designer walks into a library…
pauljervisheath
203
24k
Documentation Writing (for coders)
carmenintech
65
4.4k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Visualization
eitanlees
145
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Navigating Team Friction
lara
183
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