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のAirを使ってみた話
Search
K1mu21
April 21, 2024
Programming
0
16
GoのAirを使ってみた話
Raccoon Tech Connect #4 での資料です
K1mu21
April 21, 2024
Tweet
Share
More Decks by K1mu21
See All by K1mu21
WebGLを触ってみよう
k1mu21
1
9
学生から社会人1年目を通して
k1mu21
2
150
データベースで沼った話
k1mu21
0
26
Lidarであそぼ
k1mu21
0
18
Other Decks in Programming
See All in Programming
Sheets API使ってみた
toshi0383
2
160
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
970
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
Hanami and htmx
bkuhlmann
0
220
SIMD Parallel Programming with the Vector API
josepaumard
0
230
Domain-Driven Transformation
hschwentner
2
1.5k
Implementing Design Systems in Swift
seyfoyun
1
460
Netty Chicago Java User Group 2024-04-17
sullis
0
200
Git Rebase
bkuhlmann
11
1.6k
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
2 週間で Twitter Bot を作ってみた
contour_gara
0
770
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
220
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
36
2.1k
Building an army of robots
kneath
300
41k
Teambox: Starting and Learning
jrom
128
8.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Documentation Writing (for coders)
carmenintech
60
4k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
The Brand Is Dead. Long Live the Brand.
mthomps
49
29k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
1.9k
Scaling GitHub
holman
457
140k
YesSQL, Process and Tooling at Scale
rocio
165
13k
Designing for Performance
lara
601
67k
Transcript
GoのAirを使ってみた話 K1mu21
• K1mu21 • 所属 ◦ 株式会社ラクーンホールディングス • 分野 ◦ バックエンド(+フロントエンド)
• 使用言語 ◦ Go,Java,PHP • 最近の趣味 ◦ 皇居ラン • X ◦ @detunote
ふと個人開発してる時に思いました いちいち確認のために go run, compose upするの だるいな...
ふと個人開発してる時に思いました ホットリロード使うかぁ!
使ってみた
Air • go ホットリロードで調べるとAirが一番ヒットしたので使って みた ◦ コードの変更を監視して変更された際に自動的にビルドをし直しアプリ ケーションを再起動するライブラリ
準備 • dockerfile
準備 • docker-compose.yaml
準備 • air initで生成した.air.tomlファイルをそのまま利用(公式Githubにもあります)
実践!!!!!!!!!!
実践!!!!!!!!!! • go mod init AirExample • go mod tidy
• docker compose up -d • curl localhost:8080/example
修正!!!!!!!!!! JSONのMessage をexampleに変更
修正!!!!!!!!!! • curl localhost:8080/example
出来た!!!!!!!!!
まとめ • いちいちgo runや,dockerコンテナを立て直す必要がなくなったので開発体験が良 くなった • Goで作られてることもあり修正のビルドし直しが早くていい • Reactなども今はホットリロードが普通にあるので、これから開発環境にはホットリ ロードがあることが標準になっていくのではないでしょうか?
今回のソースコード https://github.com/k1mu21/AirExample