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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
えい
October 04, 2025
Programming
340
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
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
Go 1.27 における memory allocation の高速化
andpad
0
290
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
310
リアルな遅延を測る仕様
kota_yata
1
120
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
310
Cloudflare is Agents
chimame
0
180
ソフトウェアラスタライザ
fadis
1
290
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
220
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
450
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
360
Ethics towards AI in product and experience design
skipperchong
2
350
How STYLIGHT went responsive
nonsquared
100
6.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
380
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
エンジニアに許された特別な時間の終わり
watany
108
250k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
500
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
440
Marketing to machines
jonoalderson
1
5.7k
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を〜!
ご清聴ありがとうございました!