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.4k
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
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
640
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
980
第64回コンピュータビジョン勉強会「The PanAf-FGBG Dataset: Understanding the Impact of Backgrounds in Wildlife Behaviour Recognition」
x_ttyszk
0
170
モニタリング統一への道のり - 分散モニタリングツール統合のためのオブザーバビリティプロジェクト
niftycorp
PRO
1
360
VGGT: Visual Geometry Grounded Transformer
peisuke
1
620
Rethinking Incident Response: Context-Aware AI in Practice
rrreeeyyy
1
390
CDKTFについてざっくり理解する!!~CloudFormationからCDKTFへ変換するツールも作ってみた~
masakiokuda
1
200
AI エージェントと考え直すデータ基盤
na0
18
7.3k
Contributing to Rails? Start with the Gems You Already Use
yahonda
2
120
セキュアな社内Dify運用と外部連携の両立 ~AIによるAPIリスク評価~
zozotech
PRO
0
100
話題の MCP と巡る OCI RAG ソリューションの旅 - Select AI with RAG と Generative AI Agents ディープダイブ
oracle4engineer
PRO
5
110
敢えて生成AIを使わないマネジメント業務
kzkmaeda
2
510
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Rails Girls Zürich Keynote
gr2m
95
14k
Visualization
eitanlees
146
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Balancing Empowerment & Direction
lara
1
440
Into the Great Unknown - MozCon
thekraken
40
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
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生成コマンド