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
26
Lidarであそぼ
k1mu21
0
18
Other Decks in Programming
See All in Programming
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
130
Fast JSX: Don't clone props object #28768
yossydev
1
200
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
140
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
100
Ruby GitHub Packages
bkuhlmann
0
650
Going beyond Apache Parquet's default settings
xhochy
0
140
AppRouter Panel Talk
yosuke_furukawa
PRO
1
490
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.3k
JavaScript Closure
asoluka
0
610
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
460
SIMD Parallel Programming with the Vector API
josepaumard
0
240
禅の心を手に入れよ
eltociear
1
420
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
22
1.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
The Invisible Side of Design
smashingmag
294
49k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
22
1.4k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5k
Optimizing for Happiness
mojombo
370
69k
Building Effective Engineering Teams - LeadDev
addyosmani
32
1.9k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
BBQ
matthewcrist
80
8.8k
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