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
18
GoのAirを使ってみた話
Raccoon Tech Connect #4 での資料です
K1mu21
April 21, 2024
Tweet
Share
More Decks by K1mu21
See All by K1mu21
WebGLを触ってみよう
k1mu21
1
10
学生から社会人1年目を通して
k1mu21
2
150
データベースで沼った話
k1mu21
0
29
Lidarであそぼ
k1mu21
0
22
Other Decks in Programming
See All in Programming
AmperとFleetを使ったAndroidアプリ
yoppie
0
300
Amazon Aurora Serverless v2が意外と高かった話と、AWS Database Migration Serviceの話
satoshi256kbyte
1
110
戦略的DDDは重いのか? / Is strategic DDD heavy?
pictiny
3
2.2k
Jetpack Composeとデザインシステム
rmakiyama
0
240
The grand strategy of Ruby Parser
yui_knk
5
330
Effectで作る堅牢でスケーラブルなAPIゲートウェイ / Robust and Scalable API Gateway Built on Effect
yasaichi
7
1.2k
JavaScript Closure
asoluka
0
2k
FoodGram
iseruuuuu
0
230
Implementing Design Systems in Swift
seyfoyun
2
530
The test code generator using static analysis and LLM
mikik0
1
250
Docker_OSS_ホスティング入門
satokoki645
0
140
TypeScriptのパフォーマンス改善
yajihum
14
5.1k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Facilitating Awesome Meetings
lara
43
5.6k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.5k
Producing Creativity
orderedlist
PRO
338
39k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6.1k
Why Our Code Smells
bkeepers
PRO
331
56k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Six Lessons from altMBA
skipperchong
22
3k
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