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
72
GoのAirを使ってみた話
Raccoon Tech Connect #4 での資料です
K1mu21
April 21, 2024
Tweet
Share
More Decks by K1mu21
See All by K1mu21
Rust勉強会1回目の資料
k1mu21
0
20
ギャレトレ勉強会
k1mu21
0
8
リプレイスでやったこと
k1mu21
1
33
Cloudflareいいぞ
k1mu21
1
71
静的解析ツールを導入した話
k1mu21
1
160
WebGLを触ってみよう
k1mu21
1
39
学生から社会人1年目を通して
k1mu21
2
210
データベースで沼った話
k1mu21
0
54
Lidarであそぼ
k1mu21
0
39
Other Decks in Programming
See All in Programming
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
140
rails newと同時に型を書く
aki19035vc
6
750
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
600
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
390
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
340
Spring gRPC について / About Spring gRPC
mackey0225
0
180
functionalなアプローチで動的要素を排除する
ryopeko
1
930
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
120
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
3
3.7k
Amazon Nova Reelの可能性
hideg
0
260
Package Traits
ikesyo
2
230
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
190
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Making Projects Easy
brettharned
116
6k
Automating Front-end Workflow
addyosmani
1367
200k
Producing Creativity
orderedlist
PRO
343
39k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
The Language of Interfaces
destraynor
156
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Building Applications with DynamoDB
mza
93
6.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
Practical Orchestrator
shlominoach
186
10k
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