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.1k
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
400
Chatterbot
tomohiro
0
450
Other Decks in Programming
See All in Programming
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
130
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
450
VS Code をプロダクトにどう取り込むか
onomax
1
770
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
920
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
330
Site Reliability Engineering for GMO
pyama86
8
1.1k
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
Snowflakeで眠ったデータを起こそう!
estie
0
150
雑に思考を整理する技術と効能
konifar
64
31k
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
140
Documentation for users with AsciiDoc and Antora
ahus1
0
370
Featured
See All Featured
Web development in the modern age
philhawksworth
203
10k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6k
Become a Pro
speakerdeck
PRO
13
4.6k
GraphQLとの向き合い方2022年版
quramy
33
12k
A better future with KSS
kneath
231
16k
Rails Girls Zürich Keynote
gr2m
91
13k
Facilitating Awesome Meetings
lara
43
5.6k
KATA
mclloyd
16
12k
Adopting Sorbet at Scale
ufuk
69
8.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
14
8.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
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