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
410
Chatterbot
tomohiro
0
470
Other Decks in Programming
See All in Programming
Is Xcode slowly dying out in 2025?
uetyo
1
270
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
140
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
120
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
780
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
4k
NPOでのDevinの活用
codeforeveryone
0
840
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
5つのアンチパターンから学ぶLT設計
narihara
1
170
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
730
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
170
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
RailsConf 2023
tenderlove
30
1.1k
Become a Pro
speakerdeck
PRO
29
5.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
How to Ace a Technical Interview
jacobian
278
23k
Raft: Consensus for Rubyists
vanstee
140
7k
The Language of Interfaces
destraynor
158
25k
Facilitating Awesome Meetings
lara
54
6.4k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
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