SlideShare a Scribd company logo
Building Command
Line Tools
with Golang
Takaaki Mizuno
Innovatube TechTalk #3
Who Am I
Takaaki Mizuno
CEO of Innovatube Solutions
19 years experience as software developer
34 years experience in coding
Still coding
Based in Singapore
Japanese born in Japan
Published 20+ technical books in Japan
Golang Use Cases
Golang at Innovatube
We selected 2 primary languages for web/mobile-app back-end
development.
PHP
Golang
Golang is used for non-HTML-Heavy Web development
API Server for Mobile Apps
Use React on Frontend and backend system only returns
structured data such as JSON
Golang Use Cases
Web Services
Mobile Applications ( Android [ver 1.4~] / iOS [ver 1.5~])
Game Backend
Daemon / Service
Command Line Tools
Golang and Command
Line Tools
Which Language Are You Using
For Writing Command Line Tools ?
Node.js
Java
Python
Ruby
C++
Golang
Which language should we
use for command line tools?
It depends on the use case of the tool.
If the tool is dedicated for specific languages/framework, use that languages.
Ruby for rubygems
PHP for composer
Node.js for front-end task runners ( gulp / grunt )
It the tool is a part of a project, you should use same language
Java for Java project
Python for Python project
Other cases
Use Golang
Benefit for Command Line
Tools
Single Binary
Cross Platform ( Can support Windows easily )
No run-time dependencies
Concurrency
Many famous “command line”
tools are written in Golang
docker
Terraform ( By Hashicorp)
hub ( by GitHub )
Write command line
tools in Golang
Many Libraries You Can Use
Standard CLI
Libraries for building standard or basic Command Line applications
cli - A feature-rich and easy to use command-line package based on golang tag
cli-init - The easy way to start building Golang command line application.
climax - An alternative CLI with "human face", in spirit of Go command
cobra - A Commander for modern Go CLI interactions
codegangsta/cli - A small package for building command line apps in Go.
docopt.go - A command-line arguments parser that will make you smile.
go-flags - go command line option parser
kingpin - A command line and flag parser supporting sub commands.
liner - A Go readline-like library for command-line interfaces.
mitchellh/cli - A Go library for implementing command-line interfaces.
mow.cli - A Go library for building CLI applications with sophisticated flag and argument parsing and validation.
From: Awesome-go ( https://github.com/avelino/awesome-go#command-line )
You can use “gcli”
It generates a skeleton (codes and its directory
structure) you need to start building Command Line
Interface (CLI) tool
https://github.com/tcnksm/gcli
Easy To Use
gcli new -command=init -command=get -owner=takaaki-mizuno awesomecommand
% awesomecommand init
DEMO
Support 4 CLI libraries
+-----------------+---------+-----------------------------------------------------+
| NAME | COMMAND | URL |
+-----------------+---------+-----------------------------------------------------+
| mitchellh_cli | * | https://github.com/mitchellh/cli |
| codegangsta_cli | * | https://github.com/codegangsta/cli |
| go_cmd | * | https://github.com/golang/go/tree/master/src/cmd/go |
| flag | | https://golang.org/pkg/flag/ |
+-----------------+---------+-----------------------------------------------------+
% gcli list
Some Tips For Golang
( command line tools )
Text Colorize
mgutz/ansi & mattn/go-colorable
mgutz/ansi is a library to create ANSI colored strings
and codes
mattn/go-colorable is an io.Writer wrapper to support
Windows DOS prompt colorize
Building Dashboard
gizak/termui
Can build Text Base Dashboard with GUI Building-
Like APIs
Happy Coding!
We are Hiring!
You want to write Golang ?
Join us !
http://innovatube.com/
Q & A

More Related Content

What's hot

Come With Golang
Come With GolangCome With Golang
Come With Golang
尚文 曾
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of Golang
Kartik Sura
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
sangam biradar
 
Golang online course
Golang online courseGolang online course
Golang online course
bestonlinecoursescoupon
 
Golang for PHP programmers: A practical introduction
Golang for PHP programmers: A practical introductionGolang for PHP programmers: A practical introduction
Golang for PHP programmers: A practical introduction
Richard Tuin
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
Golang start and tips
Golang start and tipsGolang start and tips
Golang start and tips
Aaron King
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
Aaron Schlesinger
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
Ramit Surana
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
Codemotion
 
Golang
GolangGolang
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
Ganesh Samarthyam
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications
Karthik Gaekwad
 
Go from PHP engineer's perspective
Go from PHP engineer's perspectiveGo from PHP engineer's perspective
Go from PHP engineer's perspective
Sobit Akhmedov
 
Go lang
Go langGo lang
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
Folio3 Software
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
Amal Mohan N
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
SeongJae Park
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
HannahMoss14
 

What's hot (20)

Come With Golang
Come With GolangCome With Golang
Come With Golang
 
Wonders of Golang
Wonders of GolangWonders of Golang
Wonders of Golang
 
welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?welcome to gopherlabs - why go (golang)?
welcome to gopherlabs - why go (golang)?
 
Golang online course
Golang online courseGolang online course
Golang online course
 
Golang for PHP programmers: A practical introduction
Golang for PHP programmers: A practical introductionGolang for PHP programmers: A practical introduction
Golang for PHP programmers: A practical introduction
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Golang start and tips
Golang start and tipsGolang start and tips
Golang start and tips
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017Getting started with Go - Florin Patan - Codemotion Rome 2017
Getting started with Go - Florin Patan - Codemotion Rome 2017
 
Golang
GolangGolang
Golang
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications13 practical tips for writing secure golang applications
13 practical tips for writing secure golang applications
 
Go from PHP engineer's perspective
Go from PHP engineer's perspectiveGo from PHP engineer's perspective
Go from PHP engineer's perspective
 
Go lang
Go langGo lang
Go lang
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 

Viewers also liked

Golang concurrency design
Golang concurrency designGolang concurrency design
Golang concurrency design
Hyejong
 
Concurrency in Golang
Concurrency in GolangConcurrency in Golang
Concurrency in Golang
Oliver N
 
High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014
Oliver N
 
Going All-In With Go For CLI Apps
Going All-In With Go For CLI AppsGoing All-In With Go For CLI Apps
Going All-In With Go For CLI Apps
Tom Elliott
 
Golang vs Ruby
Golang vs RubyGolang vs Ruby
Golang vs Ruby
Michał Konarski
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to Go
Oliver N
 
Example Of Experience
Example Of ExperienceExample Of Experience
Example Of ExperienceLuis_Lavieri
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
Harsha Vashisht
 
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxGo debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFx
SignalFx
 
Important Comment used in AutoCAD 2D Khmer Guide
Important Comment used in AutoCAD 2D Khmer Guide Important Comment used in AutoCAD 2D Khmer Guide
Important Comment used in AutoCAD 2D Khmer Guide
Thim Mengly(ម៉េងលី,孟李)
 
Most Essential AutoCAD Commands
Most Essential AutoCAD CommandsMost Essential AutoCAD Commands
Most Essential AutoCAD Commands
Ravi Bhadauria
 
Staadpresentation1 159
Staadpresentation1 159Staadpresentation1 159
Staadpresentation1 159
AHMED NADIM JILANI
 
Tutorial Staad-Pro
Tutorial Staad-ProTutorial Staad-Pro
Tutorial Staad-ProNabeh Wildan
 
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRODESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
Ali Meer
 
Final ppt on staad pro
Final ppt on staad proFinal ppt on staad pro
Final ppt on staad pro
Sakina Faiz
 

Viewers also liked (16)

Golang concurrency design
Golang concurrency designGolang concurrency design
Golang concurrency design
 
Concurrency in Golang
Concurrency in GolangConcurrency in Golang
Concurrency in Golang
 
High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014High productivity web development workflow - JavaScript Meetup Saigon 2014
High productivity web development workflow - JavaScript Meetup Saigon 2014
 
Going All-In With Go For CLI Apps
Going All-In With Go For CLI AppsGoing All-In With Go For CLI Apps
Going All-In With Go For CLI Apps
 
Golang vs Ruby
Golang vs RubyGolang vs Ruby
Golang vs Ruby
 
Golang #5: To Go or not to Go
Golang #5: To Go or not to GoGolang #5: To Go or not to Go
Golang #5: To Go or not to Go
 
Example Of Experience
Example Of ExperienceExample Of Experience
Example Of Experience
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFxGo debugging and troubleshooting tips - from real life lessons at SignalFx
Go debugging and troubleshooting tips - from real life lessons at SignalFx
 
Important Comment used in AutoCAD 2D Khmer Guide
Important Comment used in AutoCAD 2D Khmer Guide Important Comment used in AutoCAD 2D Khmer Guide
Important Comment used in AutoCAD 2D Khmer Guide
 
Most Essential AutoCAD Commands
Most Essential AutoCAD CommandsMost Essential AutoCAD Commands
Most Essential AutoCAD Commands
 
Staadpresentation1 159
Staadpresentation1 159Staadpresentation1 159
Staadpresentation1 159
 
Staad pro
Staad proStaad pro
Staad pro
 
Tutorial Staad-Pro
Tutorial Staad-ProTutorial Staad-Pro
Tutorial Staad-Pro
 
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRODESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
DESIGN AND ANALAYSIS OF MULTI STOREY BUILDING USING STAAD PRO
 
Final ppt on staad pro
Final ppt on staad proFinal ppt on staad pro
Final ppt on staad pro
 

Similar to Building Command Line Tools with Golang

Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
Katy Slemon
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Amanda Lam
 
When, how & why use golang in 2021 go benefits & use cases
When, how & why use golang in 2021  go benefits & use casesWhen, how & why use golang in 2021  go benefits & use cases
When, how & why use golang in 2021 go benefits & use cases
Katy Slemon
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
Vimlesh Sharma
 
Golang job support.pptx
Golang job support.pptxGolang job support.pptx
Golang job support.pptx
GSAIdigitalmarketing
 
Golang web development
Golang web developmentGolang web development
Golang web development
Mobinius Technologies
 
Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...
Katy Slemon
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
Ganesh Samarthyam
 
Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language
Ganesh Samarthyam
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?
Mindfire LLC
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180
Mahmoud Samir Fayed
 
Golang Vs NodeJS: Which One To Choose For Your 2023
Golang Vs NodeJS: Which One To Choose For Your 2023Golang Vs NodeJS: Which One To Choose For Your 2023
Golang Vs NodeJS: Which One To Choose For Your 2023
SofiaCarter4
 
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptxFull_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
KalyanGV2
 
The Ring programming language version 1.2 book - Part 4 of 84
The Ring programming language version 1.2 book - Part 4 of 84The Ring programming language version 1.2 book - Part 4 of 84
The Ring programming language version 1.2 book - Part 4 of 84
Mahmoud Samir Fayed
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
Codemotion
 
Node.Js Vs Golang.pdf
Node.Js Vs Golang.pdfNode.Js Vs Golang.pdf
Node.Js Vs Golang.pdf
RahimMakhani2
 
Ultimate golang performance optimization guide
Ultimate golang performance optimization guide Ultimate golang performance optimization guide
Ultimate golang performance optimization guide
Katy Slemon
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181
Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 5 of 184
The Ring programming language version 1.5.3 book - Part 5 of 184The Ring programming language version 1.5.3 book - Part 5 of 184
The Ring programming language version 1.5.3 book - Part 5 of 184
Mahmoud Samir Fayed
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
Simon Hewitt
 

Similar to Building Command Line Tools with Golang (20)

Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
Introduction to Application Development in Python and Gtk+ / Hildon @ Maemo 5
 
When, how & why use golang in 2021 go benefits & use cases
When, how & why use golang in 2021  go benefits & use casesWhen, how & why use golang in 2021  go benefits & use cases
When, how & why use golang in 2021 go benefits & use cases
 
Scaling applications with go
Scaling applications with goScaling applications with go
Scaling applications with go
 
Golang job support.pptx
Golang job support.pptxGolang job support.pptx
Golang job support.pptx
 
Golang web development
Golang web developmentGolang web development
Golang web development
 
Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...Hire golang developers and make the shift to brighter business future (build ...
Hire golang developers and make the shift to brighter business future (build ...
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
 
Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language
 
Golang : A Hype or the Future?
Golang : A Hype or the Future?Golang : A Hype or the Future?
Golang : A Hype or the Future?
 
The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180The Ring programming language version 1.5.1 book - Part 4 of 180
The Ring programming language version 1.5.1 book - Part 4 of 180
 
Golang Vs NodeJS: Which One To Choose For Your 2023
Golang Vs NodeJS: Which One To Choose For Your 2023Golang Vs NodeJS: Which One To Choose For Your 2023
Golang Vs NodeJS: Which One To Choose For Your 2023
 
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptxFull_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
 
The Ring programming language version 1.2 book - Part 4 of 84
The Ring programming language version 1.2 book - Part 4 of 84The Ring programming language version 1.2 book - Part 4 of 84
The Ring programming language version 1.2 book - Part 4 of 84
 
Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016Getting started with go - Florin Patan - Codemotion Milan 2016
Getting started with go - Florin Patan - Codemotion Milan 2016
 
Node.Js Vs Golang.pdf
Node.Js Vs Golang.pdfNode.Js Vs Golang.pdf
Node.Js Vs Golang.pdf
 
Ultimate golang performance optimization guide
Ultimate golang performance optimization guide Ultimate golang performance optimization guide
Ultimate golang performance optimization guide
 
The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181The Ring programming language version 1.5.2 book - Part 5 of 181
The Ring programming language version 1.5.2 book - Part 5 of 181
 
The Ring programming language version 1.5.3 book - Part 5 of 184
The Ring programming language version 1.5.3 book - Part 5 of 184The Ring programming language version 1.5.3 book - Part 5 of 184
The Ring programming language version 1.5.3 book - Part 5 of 184
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 

Recently uploaded

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 

Recently uploaded (20)

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 

Building Command Line Tools with Golang

  • 1. Building Command Line Tools with Golang Takaaki Mizuno Innovatube TechTalk #3
  • 2. Who Am I Takaaki Mizuno CEO of Innovatube Solutions 19 years experience as software developer 34 years experience in coding Still coding Based in Singapore Japanese born in Japan Published 20+ technical books in Japan
  • 4. Golang at Innovatube We selected 2 primary languages for web/mobile-app back-end development. PHP Golang Golang is used for non-HTML-Heavy Web development API Server for Mobile Apps Use React on Frontend and backend system only returns structured data such as JSON
  • 5. Golang Use Cases Web Services Mobile Applications ( Android [ver 1.4~] / iOS [ver 1.5~]) Game Backend Daemon / Service Command Line Tools
  • 7. Which Language Are You Using For Writing Command Line Tools ? Node.js Java Python Ruby C++ Golang
  • 8. Which language should we use for command line tools? It depends on the use case of the tool. If the tool is dedicated for specific languages/framework, use that languages. Ruby for rubygems PHP for composer Node.js for front-end task runners ( gulp / grunt ) It the tool is a part of a project, you should use same language Java for Java project Python for Python project Other cases Use Golang
  • 9. Benefit for Command Line Tools Single Binary Cross Platform ( Can support Windows easily ) No run-time dependencies Concurrency
  • 10. Many famous “command line” tools are written in Golang docker Terraform ( By Hashicorp) hub ( by GitHub )
  • 12. Many Libraries You Can Use Standard CLI Libraries for building standard or basic Command Line applications cli - A feature-rich and easy to use command-line package based on golang tag cli-init - The easy way to start building Golang command line application. climax - An alternative CLI with "human face", in spirit of Go command cobra - A Commander for modern Go CLI interactions codegangsta/cli - A small package for building command line apps in Go. docopt.go - A command-line arguments parser that will make you smile. go-flags - go command line option parser kingpin - A command line and flag parser supporting sub commands. liner - A Go readline-like library for command-line interfaces. mitchellh/cli - A Go library for implementing command-line interfaces. mow.cli - A Go library for building CLI applications with sophisticated flag and argument parsing and validation. From: Awesome-go ( https://github.com/avelino/awesome-go#command-line )
  • 13. You can use “gcli” It generates a skeleton (codes and its directory structure) you need to start building Command Line Interface (CLI) tool https://github.com/tcnksm/gcli
  • 14. Easy To Use gcli new -command=init -command=get -owner=takaaki-mizuno awesomecommand % awesomecommand init
  • 15. DEMO
  • 16. Support 4 CLI libraries +-----------------+---------+-----------------------------------------------------+ | NAME | COMMAND | URL | +-----------------+---------+-----------------------------------------------------+ | mitchellh_cli | * | https://github.com/mitchellh/cli | | codegangsta_cli | * | https://github.com/codegangsta/cli | | go_cmd | * | https://github.com/golang/go/tree/master/src/cmd/go | | flag | | https://golang.org/pkg/flag/ | +-----------------+---------+-----------------------------------------------------+ % gcli list
  • 17. Some Tips For Golang ( command line tools )
  • 18. Text Colorize mgutz/ansi & mattn/go-colorable mgutz/ansi is a library to create ANSI colored strings and codes mattn/go-colorable is an io.Writer wrapper to support Windows DOS prompt colorize
  • 19. Building Dashboard gizak/termui Can build Text Base Dashboard with GUI Building- Like APIs
  • 21. We are Hiring! You want to write Golang ? Join us ! http://innovatube.com/
  • 22. Q & A