Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Go 1.24の新機能:tool directiveで ツールの環境構築の効率性・再現性を高める
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
えい
October 04, 2025
Programming
380
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
Performance Optimization With LLMs
xleitix
0
170
Workers Cache を知る
syumai
0
370
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
190
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
510
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.7k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1k
Seven New Principles of Software Engineering
yegor256
0
150
残高管理から台帳サービスへの進化
artoy
1
210
Domain-Driven Transformation
hschwentner
2
2.3k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
3
660
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
For a Future-Friendly Web
brad_frost
184
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Designing for Timeless Needs
cassininazir
1
530
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
The browser strikes back
jonoalderson
0
1.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
How GitHub (no longer) Works
holman
316
150k
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を〜!
ご清聴ありがとうございました!