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
410
Chatterbot
tomohiro
0
460
Other Decks in Programming
See All in Programming
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Outline View in SwiftUI
1024jp
1
330
初めてDefinitelyTypedにPRを出した話
syumai
0
400
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
みんなでプロポーザルを書いてみた
yuriko1211
0
260
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
43
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Statistics for Hackers
jakevdp
796
220k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
What's in a price? How to price your products and services
michaelherold
243
12k
A designer walks into a library…
pauljervisheath
203
24k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
For a Future-Friendly Web
brad_frost
175
9.4k
Into the Great Unknown - MozCon
thekraken
32
1.5k
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