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
文系学部卒ソフトウェアエンジニアが Georgia Techコンピューターサイエンス修士課程で直面したもの / What a Liberal Arts Graduate Software Engineer Faced in Georgia Tech's Computer Science Master's Program
toshi0607
3
390
50以上のマイクロサービスを支えるアプリケーションプラットフォームの設計・構築の後悔と進化 #CNDW2024 / regrets and evolution of application platform
toshi0607
5
6.7k
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
5.1k
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
Other Decks in Technology
See All in Technology
事業特性から逆算したインフラ設計
upsider_tech
0
100
AIに目を奪われすぎて、周りの困っている人間が見えなくなっていませんか?
cap120
1
610
OPENLOGI Company Profile for engineer
hr01
1
38k
Kiroでインフラ要件定義~テスト を実施してみた
nagisa53
3
350
九州の人に知ってもらいたいGISスポット / gis spot in kyushu 2025
sakaik
0
150
AI時代の大規模データ活用とセキュリティ戦略
ken5scal
0
100
Lambda management with ecspresso and Terraform
ijin
2
160
Oracle Cloud Infrastructure:2025年7月度サービス・アップデート
oracle4engineer
PRO
1
190
相互運用可能な学修歴クレデンシャルに向けた標準技術と国際動向
fujie
0
250
Rubyの国のPerlMonger
anatofuz
3
730
Segment Anything Modelの最新動向:SAM2とその発展系
tenten0727
0
740
リモートワークで心掛けていること 〜AI活用編〜
naoki85
0
140
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
KATA
mclloyd
32
14k
Designing for humans not robots
tammielis
253
25k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Designing for Performance
lara
610
69k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The Invisible Side of Design
smashingmag
301
51k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Optimizing for Happiness
mojombo
379
70k
The Cult of Friendly URLs
andyhume
79
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生成コマンド