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
81
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
250
За пару мгновений до main() - Олег Ковалев
gopherconrussia
0
150
Тестирование в Go c Ginkgo и Gomega - Александр Егурнов
gopherconrussia
0
130
Building an Autoscaling HTTP Proxy for Kubernetes - Aaron Schlesinger
gopherconrussia
0
140
Other Decks in Programming
See All in Programming
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
160
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
dchart: charts from deck markup
ajstarks
3
970
CSC307 Lecture 06
javiergs
PRO
0
670
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
高速開発のためのコード整理術
sutetotanuki
1
340
CSC307 Lecture 07
javiergs
PRO
0
520
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
550
SourceGeneratorのススメ
htkym
0
160
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
160
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
160
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
48
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
69
Unsuck your backbone
ammeep
671
58k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Language of Interfaces
destraynor
162
26k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
150
Designing for Timeless Needs
cassininazir
0
120
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
75
4 Signs Your Business is Dying
shpigford
187
22k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
It's Worth the Effort
3n
188
29k
The World Runs on Bad Software
bkeepers
PRO
72
12k
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