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
8.8k
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
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
4.7k
Knativeで作るDIY FaaS / serverless days tokyo 2019 knative workshop
toshi0607
4
10k
Knativeへの誘い / Go Go Knative!
toshi0607
3
5.2k
Build serverless application on top of Kubernetes #sdmel19
toshi0607
1
5.9k
Knativeで実現するKubernetes上のサーバーレスアーキテクチャ #CNDT2019 #1E3 / serverless architecture on the top of K8s with Knative
toshi0607
9
14k
技術書典で高めるせんとう力 #エンジニア銭湯 / Tech book fest loves sauna
toshi0607
1
6.6k
Goで学ぶKnative #mercarigo / learning Knative with Go
toshi0607
5
24k
Other Decks in Technology
See All in Technology
Segment Anything Model 2
tenten0727
3
700
Discovering AI Models
picardparis
4
3.9k
20240911_New_Relicダッシュボード活用例
speakerdeckfk
0
110
Creative UIs with Compose: DroidKaigi 2024
chrishorner
1
580
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
1
930
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
46k
アプリをリリースできる状態に保ったまま 段階的にリファクタリングするための 戦略と戦術 / Strategies and tactics for incremental refactoring
yanzm
6
1.4k
チームビルディングは"感性"で向き合おう / Team Building with Awareness
kohzas
0
260
ついに出た!OpenAIの最新モデル「o1」って何がすごいの?
minorun365
PRO
3
1.1k
LLVM/ASMを使った有限体の高速実装
herumi
0
120
言葉は感情の近似値である。その感情と言葉の誤差を最小化しよう ~コミュニケーションにおけるアナログ/デジタル変換の課題に立ち向かう~
nktamago
0
230
Fediverse Discovery Providers overview
andypiper
0
170
Featured
See All Featured
Designing with Data
zakiwarfel
98
5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
Building Applications with DynamoDB
mza
90
6k
A Modern Web Designer's Workflow
chriscoyier
691
190k
4 Signs Your Business is Dying
shpigford
179
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
48
2.8k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
In The Pink: A Labor of Love
frogandcode
139
22k
Raft: Consensus for Rubyists
vanstee
135
6.5k
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生成コマンド