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
0
130
Go 1.24の新機能:tool directiveで ツールの環境構築の効率性・再現性を高める
Go Conference 2025 のLT登壇資料
えい
October 04, 2025
Tweet
Share
Other Decks in Programming
See All in Programming
Python’s True Superpower
hynek
0
110
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.7k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
140
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
6
680
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
230
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
480
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
CSC307 Lecture 06
javiergs
PRO
0
690
CSC307 Lecture 02
javiergs
PRO
1
780
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
96
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
30 Presentation Tips
portentint
PRO
1
230
Discover your Explorer Soul
emna__ayadi
2
1.1k
Typedesign – Prime Four
hannesfritz
42
3k
WCS-LA-2024
lcolladotor
0
450
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
57
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
110
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を〜!
ご清聴ありがとうございました!