ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
15
Golang
@kohei_kimura
Go CLI
? Go
? Go
? A Tour of Go Go
?
? Go
stopho
:
or
go get -d github.com/kohei-kimura/stopho
brew tap kohei-kimura/homebrew-stopho
brew install stopho
stopho ¡ú
URL CLI
Go CLI
Go CLI
CLI
CSS
CLI
?
?
?
? ¡­
urfave/cli
CLI
https://github.com/urfave/cli
app.Commands = []cli.Command{
{
Name: "search", // Sub command: `stopho search`
ShortName: "s", // Alias: `stopho s`
Usage: "Generate search URLs from stock photos web sites",
Action: command.CmdSearch,
Flags: []cli.Flag{ // Options
cli.BoolFlag{ // TRUE or FALSE
Name: "japan, j", // `stopho s --japan` or `stopho s -j`
Usage: "Enable Japan mode",
},
cli.StringFlag{ // `stopho s -s $SITE_NAME`
Name: "site, s",
Usage: "Display only sites matched `value`",
},
},
},
}
func CmdSearch(c *cli.Context) {
// Arguments
term := c.Args().Get(0)
// Bool Options
if c.Bool("japan") {
// japan mode
}
// String Options
fmt.Println(c.String("site"))
}
Function
// Set Writer
outStream = new(bytes.Buffer)
app.Writer = outStream
~~~~~~
// Use `fmt.Fprintf`
fmt.Fprintf(c.App.Writer, ...)
Testing
tcnksm/gcli
? CLI
? urfave/cli CLI
15·Ö¤Ç×÷¤Ã¤ÆÅä²¼¤¹¤ë³Ò´Ç±ô²¹²Ô²µ¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä©`¥ë
Compile by `gox`
?
?
go get github.com/mitchellh/gox
gox
GitHub Releases
1. `Releases`
2. `Create a new release`
3.
4.
Homebew
? ruby
? https://github.com/Homebrew/brew/blob/
master/docs/Formula-Cookbook.md
$ brew create --set-name $APP_NAME $URL
# edit your `$APPNAME.rb`!
$ git push
Framework: urfave/cli
Generator: tcnksm/gcli
Compile tool: mitchellh/gox
Release platform: GitHub Releases
Tips
- e.g. git, docker, ¡­
GIF README.md
reddit twitter
15·Ö¤Ç×÷¤Ã¤ÆÅä²¼¤¹¤ë³Ò´Ç±ô²¹²Ô²µ¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä©`¥ë
@kohei_kimura
? IDC
IoT
@kohei_kimura
kohei-kimura
kohei-kimura.github.io
? Visual Studio Code
-> ->
IDCF Cloud - IaaS
Enjoy your Go programming!
Please star my Stopho! ->
Please follow me! ->

More Related Content

Similar to 15·Ö¤Ç×÷¤Ã¤ÆÅä²¼¤¹¤ë³Ò´Ç±ô²¹²Ô²µ¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä©`¥ë (6)

Web scraping 101 with goutte
Web scraping 101 with goutteWeb scraping 101 with goutte
Web scraping 101 with goutte
Joshua Copeland
?
Skyfall b sides-c00-l-ed5-sp-2013
Skyfall b sides-c00-l-ed5-sp-2013Skyfall b sides-c00-l-ed5-sp-2013
Skyfall b sides-c00-l-ed5-sp-2013
Mauro Risonho de Paula Assumpcao
?
Using Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at ScaleUsing Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at Scale
Boris Pavlovic
?
Zagreb workshop
Zagreb workshopZagreb workshop
Zagreb workshop
Lynn Root
?
Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python Meetup
Areski Belaid
?
Quickly function add by Eclipse Monkey
Quickly function add by Eclipse MonkeyQuickly function add by Eclipse Monkey
Quickly function add by Eclipse Monkey
bose999
?
Web scraping 101 with goutte
Web scraping 101 with goutteWeb scraping 101 with goutte
Web scraping 101 with goutte
Joshua Copeland
?
Using Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at ScaleUsing Rally for OpenStack certification at Scale
Using Rally for OpenStack certification at Scale
Boris Pavlovic
?
Zagreb workshop
Zagreb workshopZagreb workshop
Zagreb workshop
Lynn Root
?
Flask Introduction - Python Meetup
Flask Introduction - Python MeetupFlask Introduction - Python Meetup
Flask Introduction - Python Meetup
Areski Belaid
?
Quickly function add by Eclipse Monkey
Quickly function add by Eclipse MonkeyQuickly function add by Eclipse Monkey
Quickly function add by Eclipse Monkey
bose999
?

Recently uploaded (20)

Webinar - Zilliz Cloud Monthly Demo - March 2025
Webinar - Zilliz Cloud Monthly Demo - March 2025Webinar - Zilliz Cloud Monthly Demo - March 2025
Webinar - Zilliz Cloud Monthly Demo - March 2025
Zilliz
?
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB: 10 Years and Beyond by Dor LaorScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB
?
Bridging the Gap from Telco to Techco with Agile Architecture
Bridging the Gap from Telco to Techco with Agile ArchitectureBridging the Gap from Telco to Techco with Agile Architecture
Bridging the Gap from Telco to Techco with Agile Architecture
BATbern
?
Verbose AI: The Accessibility Challenge - CSUN 2025
Verbose AI: The Accessibility Challenge - CSUN 2025Verbose AI: The Accessibility Challenge - CSUN 2025
Verbose AI: The Accessibility Challenge - CSUN 2025
Ted Drake
?
Why Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Why Ivalua: A Relational Acquisition Model (RAM 2025) ComparisonWhy Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Why Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Jon Hansen
?
Manus Unveiled the China's Autonomus AI Agent.pdf
Manus Unveiled the China's Autonomus AI Agent.pdfManus Unveiled the China's Autonomus AI Agent.pdf
Manus Unveiled the China's Autonomus AI Agent.pdf
davidandersonofficia
?
Surviving Majority Loss: When a Leader Fails by Konstantin Osipov
Surviving Majority Loss: When a Leader Fails by Konstantin OsipovSurviving Majority Loss: When a Leader Fails by Konstantin Osipov
Surviving Majority Loss: When a Leader Fails by Konstantin Osipov
ScyllaDB
?
Time Travelling at Scale by Richard Hart
Time Travelling at Scale by Richard HartTime Travelling at Scale by Richard Hart
Time Travelling at Scale by Richard Hart
ScyllaDB
?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?Teams Call Records: Treasure Trove or Pandora¡¯s Box?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?
panagenda
?
The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024
Arif Efendi
?
The Memory Wall in AI - A Crisis We Must Solve
The Memory Wall in AI - A Crisis We Must SolveThe Memory Wall in AI - A Crisis We Must Solve
The Memory Wall in AI - A Crisis We Must Solve
AI Infra Forum
?
Data Intelligence Platform Transforming Data into Actionable Insights.pptx
Data Intelligence Platform Transforming Data into Actionable Insights.pptxData Intelligence Platform Transforming Data into Actionable Insights.pptx
Data Intelligence Platform Transforming Data into Actionable Insights.pptx
Lisa Gerard
?
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
ScyllaDB
?
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej ZimnochExtreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
ScyllaDB
?
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
?
People, Process, Technology, Business...
People, Process, Technology, Business...People, Process, Technology, Business...
People, Process, Technology, Business...
annashipman
?
Automated Minutes - Redefining Capturing & Creating Minutes
Automated Minutes - Redefining Capturing & Creating MinutesAutomated Minutes - Redefining Capturing & Creating Minutes
Automated Minutes - Redefining Capturing & Creating Minutes
OnBoard
?
CCleaner Professional Key with Crack [Latest New Version 2025]
CCleaner Professional Key with Crack [Latest New Version 2025]CCleaner Professional Key with Crack [Latest New Version 2025]
CCleaner Professional Key with Crack [Latest New Version 2025]
abidkhan77g77
?
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence LiuMigrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
ScyllaDB
?
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Zilliz
?
Webinar - Zilliz Cloud Monthly Demo - March 2025
Webinar - Zilliz Cloud Monthly Demo - March 2025Webinar - Zilliz Cloud Monthly Demo - March 2025
Webinar - Zilliz Cloud Monthly Demo - March 2025
Zilliz
?
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB: 10 Years and Beyond by Dor LaorScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB: 10 Years and Beyond by Dor Laor
ScyllaDB
?
Bridging the Gap from Telco to Techco with Agile Architecture
Bridging the Gap from Telco to Techco with Agile ArchitectureBridging the Gap from Telco to Techco with Agile Architecture
Bridging the Gap from Telco to Techco with Agile Architecture
BATbern
?
Verbose AI: The Accessibility Challenge - CSUN 2025
Verbose AI: The Accessibility Challenge - CSUN 2025Verbose AI: The Accessibility Challenge - CSUN 2025
Verbose AI: The Accessibility Challenge - CSUN 2025
Ted Drake
?
Why Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Why Ivalua: A Relational Acquisition Model (RAM 2025) ComparisonWhy Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Why Ivalua: A Relational Acquisition Model (RAM 2025) Comparison
Jon Hansen
?
Manus Unveiled the China's Autonomus AI Agent.pdf
Manus Unveiled the China's Autonomus AI Agent.pdfManus Unveiled the China's Autonomus AI Agent.pdf
Manus Unveiled the China's Autonomus AI Agent.pdf
davidandersonofficia
?
Surviving Majority Loss: When a Leader Fails by Konstantin Osipov
Surviving Majority Loss: When a Leader Fails by Konstantin OsipovSurviving Majority Loss: When a Leader Fails by Konstantin Osipov
Surviving Majority Loss: When a Leader Fails by Konstantin Osipov
ScyllaDB
?
Time Travelling at Scale by Richard Hart
Time Travelling at Scale by Richard HartTime Travelling at Scale by Richard Hart
Time Travelling at Scale by Richard Hart
ScyllaDB
?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?Teams Call Records: Treasure Trove or Pandora¡¯s Box?
Teams Call Records: Treasure Trove or Pandora¡¯s Box?
panagenda
?
The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024The Most Important Tech Innovations of 2024
The Most Important Tech Innovations of 2024
Arif Efendi
?
The Memory Wall in AI - A Crisis We Must Solve
The Memory Wall in AI - A Crisis We Must SolveThe Memory Wall in AI - A Crisis We Must Solve
The Memory Wall in AI - A Crisis We Must Solve
AI Infra Forum
?
Data Intelligence Platform Transforming Data into Actionable Insights.pptx
Data Intelligence Platform Transforming Data into Actionable Insights.pptxData Intelligence Platform Transforming Data into Actionable Insights.pptx
Data Intelligence Platform Transforming Data into Actionable Insights.pptx
Lisa Gerard
?
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
The Nile Approach: Re-engineering Postgres for Millions of Tenants by Gwen Sh...
ScyllaDB
?
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej ZimnochExtreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
Extreme Elasticity with Tablets, Raft and Kubernetes by Maciej Zimnoch
ScyllaDB
?
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramentoAIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
AIXMOOC 2.3 - Modelli di reti neurali con esperimenti di addestramento
Alessandro Bogliolo
?
People, Process, Technology, Business...
People, Process, Technology, Business...People, Process, Technology, Business...
People, Process, Technology, Business...
annashipman
?
Automated Minutes - Redefining Capturing & Creating Minutes
Automated Minutes - Redefining Capturing & Creating MinutesAutomated Minutes - Redefining Capturing & Creating Minutes
Automated Minutes - Redefining Capturing & Creating Minutes
OnBoard
?
CCleaner Professional Key with Crack [Latest New Version 2025]
CCleaner Professional Key with Crack [Latest New Version 2025]CCleaner Professional Key with Crack [Latest New Version 2025]
CCleaner Professional Key with Crack [Latest New Version 2025]
abidkhan77g77
?
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence LiuMigrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
ScyllaDB
?
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Agentic AI in Action: Real-Time Vision, Memory & Autonomy with Browser Use & ...
Zilliz
?

15·Ö¤Ç×÷¤Ã¤ÆÅä²¼¤¹¤ë³Ò´Ç±ô²¹²Ô²µ¥³¥Þ¥ó¥É¥é¥¤¥ó¥Ä©`¥ë