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 1.24の新機能:tool directiveで ツールの環境構築の効率性・再現性を高める
Search
えい
October 04, 2025
Programming
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go 1.24の新機能:tool directiveで ツールの環境構築の効率性・再現性を高める
Go Conference 2025 のLT登壇資料
えい
October 04, 2025
Other Decks in Programming
See All in Programming
関数型プログラミングのメリットって何だろう?
wanko_it
0
150
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
570
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
140
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
830
継続モナドとリアクティブプログラミング
yukikurage
3
410
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
460
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
380
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
230
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
250
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
フィードバックで育てるAI開発
kotaminato
1
110
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
330
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
960
Done Done
chrislema
186
16k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
180
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Documentation Writing (for coders)
carmenintech
77
5.4k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
270
Transcript
Go 1.24の新機能:tool directiveで ツールの環境構築の効率性・再現性を高める 2025/09/28 Go Conference 2025
Eitaro Yokoyama
自己紹介 名前 : えい 領域:バックエンド・SRE 所属:ディップ株式会社 経歴:新卒1年目
←Xアカウント
GoのCLIツールよく使いますよね!
開発者間でCLIツールのバージョンを 統一したい!
従来の手法
tools.goによる管理 • ビルド制約 • ブランクインポート go.modで管理
tools.goによる管理 go mod init go mod tidy
tools.goによる管理 • go.modに記録するために tools.go を管理する必 要がある • 手動インストールもしくはスクリプトが必要 •
アップグレードなどの管理が非効率
tool directiveで開発者体験が向上!
tool directiveによる管理 go get –tool <ツール>でツールの追加
tool directiveによる管理 go.mod toolディレクティブ 依存関係も追加され ている
go toolコマンドで確認 定義されていたツール群 追加したツール
go tool <ツール>で使用
meta-patternの利用 tool direcitiveで管理しているツールの一括アッ プデート
キャッシュ • Goビルドキャッシュに保存されるようになった • 初回実行は遅くなるが,繰り返し実行が 高速化される
実行ファイルのキャッシュ https://github.com /golang/go/issues /69290
toolを別modファイルに分割する
toolを別のmodファイルに分割 • tools.modを作成 • modfileを指定してtool directiveに追加
toolを別のmodファイルに分割 modfileを指定して同様に実行できる
toolを別のmodファイルに分割 プロジェクトa プロダクトの go.mod CLIツール のgo.mod プロジェクトb
プロダクトの go.mod CLIツール のgo.mod
toolを別のmodファイルに分割 ・依存関係の分離ができる ・プロジェクトに必要な依存関係とツールに必要な 依存関係によるバージョン競合を防ぐ
参考文献 • https://tip.golang.org/doc/go1.24#tools • https://tip.golang.org/doc/modules/managing-dependencies #tools • https://github.com/golang/go/issues/69290
• https://github.com/go-modules-by-example/index/blob/ma ster/010_tools/README.md
tool directiveで よりよいGo Lifeを〜!
ご清聴ありがとうございました!