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 のライブラリやっていき 💪 #go #golang / Let's creating a...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Osamu TONOMORI
May 16, 2018
Programming
2.3k
3
Share
Go のライブラリやっていき 💪 #go #golang / Let's creating a original library by Go
Gopher 道場 1st grad ceremony LT
Osamu TONOMORI
May 16, 2018
More Decks by Osamu TONOMORI
See All by Osamu TONOMORI
About Merpay Architect Team 2021
osamingo
0
1.8k
Gopher's Travel Journal 2018
osamingo
1
1.9k
Google App Engine を利用した、新規 Web サービスの立ち上げ方
osamingo
23
8.5k
GAE/Go の勘どころ
osamingo
10
5.2k
Go で始める JSON-RPC 入門
osamingo
4
70k
Other Decks in Programming
See All in Programming
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
250
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
Angular Signal Forms
debug_mode
0
110
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
350
[RubyKaigi 2026] Require Hooks
palkan
1
200
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
540
AIエージェントで業務改善してみた
taku271
0
530
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
140
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
190
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
190
AI-DLC Deep Dive
yuukiyo
9
4.1k
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
200
Featured
See All Featured
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
480
Typedesign – Prime Four
hannesfritz
42
3k
Building an army of robots
kneath
306
46k
How to make the Groovebox
asonas
2
2.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
130
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
The Language of Interfaces
destraynor
162
26k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.4k
Done Done
chrislema
186
16k
Design in an AI World
tapps
0
190
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
220
Transcript
Go のライブラリやっていき @osamingo Gopher Dojo 1st Grad Ceremony 2018/05/16
Agenda 1. 自己紹介 (30 sec) 2. ライブラリ作るモチベーション (1 min) 3.
ライブラリの公開方法 (20 sec) 4. ライブラリを使ってもらうには (3 min) 5. まとめ (10 sec) Gopher Dojo 1st Grad Ceremony 2
自己紹介 主森 理 - Osamu TONOMORI 株式会社メルペイ Software Engineer (Backend)
https://{twitter,github,etc.}.com/ osamingo Gopher Dojo 1st Grad Ceremony 3
ライブラリ作るモチベーション Gopher Dojo 1st Grad Ceremony 4
あぁ、不便だなぁ… Gopher Dojo 1st Grad Ceremony 5
このロジック切り出した方が良いのでは Gopher Dojo 1st Grad Ceremony 6
有名なエンジニアになりたいんや! Gopher Dojo 1st Grad Ceremony 7
正直、モチベーションなんてなんでも良い Gopher Dojo 1st Grad Ceremony 8
ライブラリの公開方法 Gopher Dojo 1st Grad Ceremony 9
ライブラリの公開方法 1. GitHub にアカウントを作ります。 Gopher Dojo 1st Grad Ceremony 10
ライブラリの公開方法 1. GitHub にアカウントを作ります。 2. Public リポジトリを作ります。 Gopher Dojo 1st
Grad Ceremony 11
ライブラリの公開方法 1. GitHub にアカウントを作ります。 2. Public リポジトリを作ります。 3. Go のソースコードを
Push します。 Gopher Dojo 1st Grad Ceremony 12
終了 Gopher Dojo 1st Grad Ceremony 13
補足 gem, npm など中央集権的なリポジトリが、 存在しないので即時公開となる Gopher Dojo 1st Grad Ceremony
14
補足 gem, npm など中央集権的なリポジトリが、 存在しないので即時公開となる (良くも悪くも) Gopher Dojo 1st Grad
Ceremony 15
ライブラリを使ってもらうには Gopher Dojo 1st Grad Ceremony 16
品質を担保する為の3つのチェックポイント Continuous Integration Documentation Static Code Analysis Gopher Dojo 1st
Grad Ceremony 17
Continuous Integration 基本中の基本 正常なビルド、テストを保証する ライブラリという観点だと、Travis CI がオススメ! Matrix に環境を整えられるので、 Build
Tag 利用時などに便利 language: go go: - '1.8.x' - '1.9.x' - '1.10.x' - 'tip' Gopher Dojo 1st Grad Ceremony 18
Continuous Integration Covarage 集計には、CodeCov がオススメ! Chrome Extention が、バリ便利 Ref. GitHub
を快適にブラウジングするための3 種の神器 Gopher Dojo 1st Grad Ceremony 19
Documentation README は、ちゃんと書きましょう! 何が嬉しくなるライブラリなのか、1 文で理解できるように 特に License はちゃんと明記しないと、使う側も困ります Benchmark の結果を乗せると、優位性が明らかになって良い
# Machine: MacBook Pro (Retina, 15-inch, Mid 2015) # CPU : 2.8 GHz Intel Core i7 # Memory : 16 GB 1600 MHz DDR3 BenchmarkEncoder_Encode-8 20000000 107 ns/op 46 B/op 1 allocs/op BenchmarkEncoder_Decode-8 30000000 46.8 ns/op 0 B/op 0 allocs/op PASS ok github.com/osamingo/indigo/base58 3.730s Gopher Dojo 1st Grad Ceremony 20
Documentation GoDoc のありがたさたるや ホスティングしなくて良い コードにコメントすれば自動生成 Example 書けば、ドキュメント上で実行できる https://godoc.org/github.com/{account_name}/{repository_name} Gopher Dojo
1st Grad Ceremony 21
Static Code Analysis Go Report Card 必ず利用してほしい gofmt , go
vet , gocyclo , golint , ineffassign を計測してくれる それだけでなく、 License の有無や、Misspell も判定してくれる 頑張って、評価 A+ をとりましょう 類似サービスとして、CODEBEAT, CODE CLIMATE もある Gopher Dojo 1st Grad Ceremony 22
こんな感じになると気持ちいい Gopher Dojo 1st Grad Ceremony 23
まとめ ライブラリを作るモチベーション なんでも良い ライブラリの公開手順 GitHub にリポジトリ作れば完了 ライブラリを使って貰うには 3 つのチェックポイントを満たす Gopher
Dojo 1st Grad Ceremony 24
Thank you for your attention! Gopher Dojo 1st Grad Ceremony
25