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で作り直すgitignore生成コマンド #go #golang / Reinvent...
Search
Toshinori Sugita
May 16, 2018
Technology
0
9.3k
Goで作り直すgitignore生成コマンド #go #golang / Reinvent gitignore command using golang
Toshinori Sugita
May 16, 2018
Tweet
Share
More Decks by Toshinori Sugita
See All by Toshinori Sugita
50以上のマイクロサービスを支えるアプリケーションプラットフォームの設計・構築の後悔と進化 #CNDW2024 / regrets and evolution of application platform
toshi0607
5
6.3k
OPA and cloud resources
toshi0607
0
13k
KompalWeather: Serverless Sauna Service with Cloud Run
toshi0607
0
12k
Knativeで作るDIY FaaS / serverless days fukuoka 2019 knative workshop
toshi0607
0
5k
Knativeで作るDIY FaaS / serverless days tokyo 2019 knative workshop
toshi0607
4
11k
Knativeへの誘い / Go Go Knative!
toshi0607
3
5.6k
Build serverless application on top of Kubernetes #sdmel19
toshi0607
1
6.3k
Knativeで実現するKubernetes上のサーバーレスアーキテクチャ #CNDT2019 #1E3 / serverless architecture on the top of K8s with Knative
toshi0607
9
15k
技術書典で高めるせんとう力 #エンジニア銭湯 / Tech book fest loves sauna
toshi0607
1
7k
Other Decks in Technology
See All in Technology
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
920
プロダクトエンジニアリング組織への歩み、その現在地 / Our journey to becoming a product engineering organization
hiro_torii
0
130
"サービスチーム" での技術選定 / Making Technology Decisions for the Service Team
kaminashi
1
190
Prox Industries株式会社 会社紹介資料
proxindustries
0
330
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
170
Wasm元年
askua
0
160
WordPressから ヘッドレスCMSへ! Storyblokへの移行プロセス
nyata
0
170
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
610
怖くない!はじめてのClaude Code
shinya337
0
170
フィンテック養成勉強会#54
finengine
0
180
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
140
AWS Organizations 新機能!マルチパーティ承認の紹介
yhana
1
170
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Facilitating Awesome Meetings
lara
54
6.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
How to Ace a Technical Interview
jacobian
277
23k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
710
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Practical Orchestrator
shlominoach
188
11k
Bash Introduction
62gerente
614
210k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Six Lessons from altMBA
skipperchong
28
3.9k
Transcript
Goで作り直す.gitignore生成コマンド 2018/5/14 Gopher道場最終回
自己紹介 • 杉田 寿憲 ◦ Toshinori Sugita ◦ toshi0607 ◦
toshi0607 ◦ toshi0607 • Software Engineer@freee ◦ 好評の Windows 版に続いて急遽リリースを決めた Mac 版アプリの開発に、Xamarin.Mac を採用し て大幅な開発効率のアップと機能の標準化を実現。 • 最近の様子 ◦ Ruby > JavaScript >>> Go >>>>>> C# • 『Extensive Xamarin』(共著)発売中! ◦ 技術書典から商業出版へ
今日のお話 • gigというコマンドをGoで作った • 作ったきっかけ • 課題と解決策 • 残タスク
今日のお話 • gigというコマンドをGoで作った • 作ったきっかけ • 課題と解決策 • 残タスク
gigコマンドとは? ※https://github.com/toshi0607/gig
gigコマンドとは? ※https://github.com/github/gitignore
gigコマンドとは? • Usage ◦ gig [OPTIONS] [Language] • Application Options:
◦ -l, --list Show list of available language ◦ -f, --File Output .gitignore file ◦ -q, --quiet Hide stdout ◦ -v, --version Show version • Help Options: ◦ -h, --help Show this help message ※https://github.com/toshi0607/gig
gigコマンドとは? ※https://github.com/toshi0607/gig
giboでええやん? ※https://github.com/toshi0607/gig
gigコマンドとは? ※https://github.com/toshi0607/gig
今日のお話 • gigというコマンドをGoで作った • 作ったきっかけ • 課題と解決策 • 残タスク
作ったきっかけ • simonwhitaker/giboとは別コンセプトで同じことしたい • io.Writer interfaceの気持ちよさを形にしたい • クロスプラットフォームでシュッと配布してみたい
今日のお話 • gigというコマンドをGoで作った • 作ったきっかけ • 課題と解決策 • 残タスク
課題 こんなURLにアクセスしたいけど… https://github.com/github/gitignore/raw/master/Go.gitignore
課題 引数で指定した言語からよしなにURLを組み立てたい https://github.com/github/gitignore/raw/master/Go.gitignore
giboの解決策 • github/gitignoreをgit clone • language_file=$(find "$local_repo" -maxdepth 1 -iname
"$1.gitignore" | head -n 1) ※https://github.com/simonwhitaker/gibo
解決策① • 入力をパスカルケースに変換 • pinzolo/casee go Go cakephp CakePhp
解決策① • 入力をパスカルケースに変換 • pinzolo/casee go Go cakephp CakePhp なんとかできるかもしれないが、がんばっても沼っぽい
解決策② • 対応言語リストを毎回取得
解決策② • 対応言語リストを毎回取得 v 単に言語指定するユースケースで2回もアクセスしたくない
解決策③ • リストをフィルタリングできるコマンドと組み合わせる • Go言語によるCLIツール開発とUNIX哲学について ◦ http://blog.yuuk.io/entry/go-cli-unix • peco/peco ◦
https://github.com/peco/peco
解決策③ ※https://github.com/toshi0607/gig
今日のお話 • gigというコマンドをGoで作った • 作ったきっかけ • 課題と解決策 • 残タスク
残タスク • .gitignore開発環境シリーズ(Global系)対応 • ネットワークに依存しないテスト • ゴルーチンのエラー処理 • アップデート機構
ご清聴ありがとうございました! Goで作り直す.gitignore生成コマンド