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
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
780
私はどうやって技術力を上げたのか
yusukebe
43
18k
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
960
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
210
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
2k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
CSC305 Lecture 05
javiergs
PRO
0
210
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
CSC509 Lecture 06
javiergs
PRO
0
260
CSC305 Lecture 01
javiergs
PRO
1
400
XP, Testing and ninja testing ZOZ5
m_seki
3
570
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
A better future with KSS
kneath
239
18k
A Tale of Four Properties
chriscoyier
160
23k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
It's Worth the Effort
3n
187
28k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
580
Mobile First: as difficult as doing things right
swwweet
224
10k
GraphQLとの向き合い方2022年版
quramy
49
14k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Bash Introduction
62gerente
615
210k
Automating Front-end Workflow
addyosmani
1371
200k
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