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
Go Package Development
Search
Tomohiro Taira
March 19, 2016
Programming
1
1.2k
Go Package Development
2016.3.19 / Golang 勉強会 in Okinawa #okigo1
Tomohiro Taira
March 19, 2016
Tweet
Share
More Decks by Tomohiro Taira
See All by Tomohiro Taira
Awesome LAMP
tomohiro
1
420
Chatterbot
tomohiro
0
470
Other Decks in Programming
See All in Programming
iOSからFlutterへ20代エンジニアの転身とWidget Preview実践
nappannda
0
110
チームのテスト力を鍛える
goyoki
3
1.1k
楽して成果を出すためのセルフリソース管理
clipnote
0
200
print("Hello, World")
eddie
2
540
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
6k
Learn CPU architecture with Assembly
akkeylab
1
140
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.7k
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
26
12k
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
5.6k
Build your own WebP codec in Swift
kishikawakatsumi
2
260
Platformに“ちょうどいい”責務ってどこ? 関心の熱さにあわせて考える、責務分担のプラクティス
estie
2
370
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
720
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
540
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
3k
KATA
mclloyd
32
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Practical Orchestrator
shlominoach
190
11k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
For a Future-Friendly Web
brad_frost
180
9.9k
Transcript
Go Package Development (PMBOHษڧձJO0LJOBXBPLJHP
@Tomohiro
http://tomohiro.me/go-gyazo
http://tomohiro.me/gyazo-cli
Writing Code with Atom + goplus • gocode • gofmt,
go imports • golint • vet • godef • gorename
Vendoring by govend (Go 1.6+) $ govend -v github.com/google/go-querystring/query golang.org/x/oauth2
google.golang.org/appengine/urlfetch google.golang.org/appengine/internal/urlfetch github.com/golang/protobuf/proto github.com/golang/protobuf/proto/testdata github.com/golang/protobuf/proto/proto3_proto google.golang.org/appengine/internal google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/log google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/base golang.org/x/net/context golang.org/x/oauth2/internal …
Testing by go test $ go test -v ./gyazo -cover
=== RUN TestNewClient --- PASS: TestNewClient (0.00s) === RUN TestNewClient_EmptyAccessToken --- PASS: TestNewClient_EmptyAccessToken (0.00s) === RUN TestList --- PASS: TestList (0.00s) === RUN TestList_InvalidToken --- PASS: TestList_InvalidToken (0.00s) === RUN TestUpload --- PASS: TestUpload (0.00s) === RUN TestDelete --- PASS: TestDelete (0.00s) PASS coverage: 74.3% of statements
with Travis CI https://travis-ci.org/Tomohiro/go-gyazo
with goveralls for Coveralls https://coveralls.io/github/Tomohiro/go-gyazo
Documentation on GoDoc https://godoc.org/github.com/Tomohiro/go-gyazo/gyazo
Cross Compiling by gox $ gox -os "darwin linux windows"
-arch "386 amd64" -output "pkg/{{.OS}}_{{.Arch}}/gyazo" Number of parallel builds: 3 --> windows/amd64: github.com/Tomohiro/gyazo-cli --> linux/386: github.com/Tomohiro/gyazo-cli --> darwin/386: github.com/Tomohiro/gyazo-cli --> darwin/amd64: github.com/Tomohiro/gyazo-cli --> linux/amd64: github.com/Tomohiro/gyazo-cli --> windows/386: github.com/Tomohiro/gyazo-cli $ tree pkg/ pkg/ |-- darwin_386 | `-- gyazo |-- darwin_amd64 | `-- gyazo |-- linux_386 …
Release the package to GitHub Releases by ghr $ tree
pkg/ pkg/ `-- dist `-- 0.4.1 |-- 0.4.1_SHA256SUMS |-- gyazo_0.4.1_darwin_386.zip |-- gyazo_0.4.1_darwin_amd64.zip |-- gyazo_0.4.1_linux_386.zip |-- gyazo_0.4.1_linux_amd64.zip |-- gyazo_0.4.1_windows_386.zip `-- gyazo_0.4.1_windows_amd64.zip $ ghr -u tomohiro -r gyazo-cli 0.4.1 pkg/dist/0.4.1 --> Uploading: 0.4.1_SHA256SUMS --> Uploading: gyazo_0.4.1_darwin_amd64.zip --> Uploading: gyazo_0.4.1_window_amd64.zip --> Uploading: gyazo_0.4.1_darwin_386.zip --> Uploading: gyazo_0.4.1_linux_amd64.zip --> Uploading: gyazo_0.4.1_linux_386.zip --> Uploading: gyazo_0.4.1_windows_386.zip
on GitHub Releases https://github.com/Tomohiro/gyazo-cli/releases
None