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 – Michail Grachev
Search
GopherCon Russia
April 13, 2019
Programming
0
74
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
180
Learning Unsung Gotchas of Go - Rashmi Nagpal
gopherconrussia
1
210
Прозрачный gRPC-proxy один-ко-многим - Андрей Смирнов
gopherconrussia
0
110
Из Python в Go и обратно - Андрей Минкин
gopherconrussia
0
110
Оптимизация работы с PostgreSQL в Go: от 50 до 5000 RPS - Иван Осадчий
gopherconrussia
0
130
Пакет embed: распаковка знаний - Илья Данилкин
gopherconrussia
0
160
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
95
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
91
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
95
Other Decks in Programming
See All in Programming
Containerization Tips and Tricks for PHP apps
dunglas
2
3.5k
Does Ruby Parser dream of highly expressive grammar?
ydah
3
520
GitHub Actionsの痒いところを埋めるサードパーティーランナー
dora1998
2
350
CQRS+ES解体新書 / CQRS ES Disassembly Book
nrslib
7
720
実践AI/ML ~よくあるユースケースとレコメンデーションの効果的な活用戦略~
cmnakamurashogo
0
190
ウォンテッドリーでのKMPワークフロー / KMP workflow at Wantedly
kubode
0
120
新年度から始めるJava言語のファーストステップ2024
tatsuya1bm
0
150
Goでリフレクションする、その前に / Kansai.go #1
utgwkk
4
510
LTのやり方
yosuke_furukawa
PRO
9
1.1k
HonoのRPCで真の型安全が欲しかった
kosei28
1
210
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | KotlinConf
prof18
0
110
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
76k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5.1k
Statistics for Hackers
jakevdp
790
220k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
Designing Experiences People Love
moore
136
23k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
16
1.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Bash Introduction
62gerente
605
210k
Building Effective Engineering Teams - LeadDev
addyosmani
34
2k
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