Karl

Karl

karl@breezymind.com

๐Ÿ“ seoul
flutter

flutter, dynamic links ์‚ฌ์šฉ ๊ตฌ์ถ•๊ธฐ

flutter app ์„ ๊ฐœ๋ฐœํ•˜๋ฉด์„œ ํŠน์ • ๋„๋ฉ”์ธ์œผ๋กœ dynamic links ๋ฅผ ์‚ฌ์šฉํ•œ ๊ฒฝํ—˜์„ ๊ธฐ๋กํ•œ๋‹ค. (๊ฐœ์ธ ๋„๋ฉ”์ธ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋ฉด page.link ๋ผ๋Š” ๋„๋ฉ”์ธ์„ firebase ์—์„œ ์ œ๊ณตํ•œ๋‹ค.)

aws

AWS, ๋„คํŠธ์›Œํฌ ํ™˜๊ฒฝ๊ตฌ์ถ•

AWS, lightsail ์ปจํ…Œ์ด๋„ˆ ์„œ๋น„์Šค์—์„œ ์ง€์›ํ•˜๋Š” ๊ฒƒ์ด ๋ถ€์กฑํ•ด์„œ ECS ๋ฅผ ๋ฌด์ž‘์ • ์‚ฌ์šฉํ•ด๋ณด๊ณ ์ž ํ–ˆ๋‹ค. (lightsail ์ปจํ…Œ์ด๋„ˆ๋„ ๊ธฐ๋ฐ˜์€ ECS ๋ผ๊ณ  ํ•˜๋˜๋ฐ ์„ธ๋ถ€์ ์ธ ๊ธฐ๋Šฅ์ด ๋น ์ ธ์žˆ์—ˆ๋‹ค.) ๋จผ์ € lightsail ์—์„œ ๋ฒ—์–ด๋‚˜ aws ์ƒ์— ๋„คํŠธ์›Œํฌ๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ฒƒ์ด ๋จผ์ € ํ•ด์•ผ ํ•  ์ผ์ด์—ˆ๊ณ  ์•„๋ž˜์™€ ๊ฐ™์ด VPC ๋ฅผ ๊ตฌ์„ฑํ•˜๊ณ  AZ ๋ฅผ ๋‚˜๋ˆ„์–ด pubic / private zone์˜ ๊ตฌ์„ฑ์„ ๋งŒ๋“ค์–ด์•ผ ํ–ˆ๋‹ค. 1. ๋„คํŠธ์›Œํฌ

aws

AWS, SES ๋„๋ฉ”์ธ ์—ฐ๋™

๊ฐœ์ธ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋˜ ๋„์ค‘ AWS ์˜ Simple Email Service ๋ฅผ ๊ณ ๋ คํ•˜๊ฒŒ ๋๊ณ  ์—ฐ๋™๊ณผ์ •์„ ๊ธฐ๋กํ•ด ๋‘๊ธฐ๋กœ ํ•œ๋‹ค. 1. ์ž๊ฒฉ์ฆ๋ช…์ƒ์„ฑ ๊ณผ๊ฐํ•˜๊ฒŒ ์˜ค๋ฅธ์ชฝ ์œ„ "์ž๊ฒฉ์ฆ๋ช…์ƒ์„ฑ" ์„ ํด๋ฆญํ•ด๋ดค๋‹ค. ์ƒ์†Œํ•œ ํ™”๋ฉด์ด๋‚˜ ์ˆ˜์ •ํ•˜๋ฉด ๋˜์ง€ ํ•˜๋Š” ๋งˆ์Œ์œผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์ด ๋Œ€์ถฉ ์ž…๋ ฅ ํ›„ "์ž๊ฒฉ์ฆ๋ช…์ƒ์„ฑ" "์ž๊ฒฉ์ฆ๋ช…์ƒ์„ฑ" ์™„๋ฃŒ ํ›„ ์•„๋ž˜์™€ ๊ฐ™์ด TXT ๋ ˆ์ฝ”๋“œ ๋ฐ CNAME ๋ ˆ์ฝ”๋“œ๋ฅผ ์ง€์ • ํ•˜๋ผ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ๋ณผ

golang

Golang, CGO Linux ํฌ๋กœ์Šค ์ปดํŒŒ์ผ๋Ÿฌ

* Cross Compiler ์ด ํฌ๋กœ์Šค ์ปดํŒŒ์ผ๋Ÿฌ๋Š” Apple Silicon ๋ฐ Intel Mac์„ ๋ชจ๋‘ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. homebrew-macos-cross-toolchains/README.md at main ยท messense/homebrew-macos-cross-toolchainsmacOS cross compiler toolchains. Contribute to messense/homebrew-macos-cross-toolchains development by creating an account on GitHub.GitHubmessense * brew ํŒจํ‚ค์ง€ ์„ค์น˜ brew tap messense/macos-cross-toolchains brew install x86_64-unknown-linux-gnu brew install aarch64-unknown-linux-gnu * CrossCompile, x86_

gRPC

gRPC ๊ตฌํ˜„ - Client Streaming RPC #2

์ด๋ฒˆ ๊ธ€์—์„œ๋Š” gRPC ์˜ Client Streaming RPC ์˜ˆ์ œ๋ฅผ ๊ตฌํ˜„ ํ•ด๋ณด๋„๋ก ํ•œ๋‹ค. Client Streaming RPC ๋Š” ๋‹ค๋Ÿ‰์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ŠคํŠธ๋ฆฌ๋ฐ ๋ฐฉ์‹์œผ๋กœ ์ „์†กํ•œ๋‹ค๋Š” ์ ์—์„œ ์ง€๋‚œ ๊ธ€์—์„œ ๋‹ค๋ค˜๋˜ Unary RPC ์™€ ๋‹ค๋ฅด๋‹ค. (์•„๋ž˜ ๊ทธ๋ฆผ์—์„œ ์™ผ์ชฝ ์•„๋ž˜) gRPC Learning (Part 1) - Yang(Bruce) Li - Medium Client Streaming RPC์˜ ๊ตฌํ˜„ ์‹œ์ž‘ํ•˜๊ธฐ Client Streaming RPC๋Š”

gRPC

gRPC ๊ตฌํ˜„ - Unary RPC #1

gRPC์˜ ๋Œ€ํ‘œ์ ์ธ 4๊ฐ€์ง€ ์„œ๋น„์Šค ์˜ˆ์ œ๋ฅผ ์ง์ ‘ ๊ตฌํ˜„ํ•ด๋ณด๊ณ  ์ •๋ฆฌํ•ด ๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค. ์ด๋ฒˆ ๊ธ€์—์„œ๋Š” gRPC ์˜ ๊ฐ€์žฅ ๋‹จ์ˆœํ•œ ์„œ๋น„์Šค ํ˜•ํƒœ์ธ Unary RPC ๋ฅผ ์ž‘์„ฑ ํ•ด๋ณด๋„๋ก ํ•œ๋‹ค. Performance is not an Option - gRPC and Cassandra gRPC์— ๋Œ€ํ•œ ์†Œ๊ฐœ gRPC ํ”„๋ ˆ์ž„์›์— ๋Œ€ํ•œ ์†Œ๊ฐœ๋Š” ์ข‹์€ ๊ธ€์„ ์†Œ๊ฐœํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋Œ€์‹ ํ•˜๋ฉฐ, ๋‹ค์Œ ๋งํฌ(Microservices with gRPC

benchmark

uvicorn 0.16.0 ์„ฑ๋Šฅ๋ฌธ์ œ

cloud ์—์„œ uvicorn ์œผ๋กœ ์„œ๋น„์Šค ํ•ด์•ผ ํ•˜๋Š” ์ƒํ™ฉ์—์„œ ์–ด๋–ค ๊ตฌ์กฐ๋กœ ์„œ๋น„์Šค ํ•˜๋Š”๊ฒŒ ํšจ์œจ์ด ์ข‹์„ ์ง€ ๊ณ ๋ฏผ ์ค‘์— ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ–ˆ๊ณ  ๋œป๋ฐ–์˜ ์ƒํ™ฉ์„ ๊ธฐ๋กํ•ด๋‘”๋‹ค. ํ…Œ์ŠคํŠธ๋ฅผ ๋งˆ์นœ ์ง€๊ธˆ ๊ฒฐ๋ก ์€ uvicorn ์˜ ํŠน์ •๋ฒ„์ „ ๋ฌธ์ œ๊ฐ€ ์•„๋‹Œ ๋“ฏ ํ•˜๋‹ค. uvicorn ์ด worker ํ”„๋กœ์„ธ์Šค๋ฅผ ์ œ์–ดํ•˜๋Š” ๋ฐฉ์‹(spawn)์—์„œ ํŒŒ์ƒ๋œ ๋ฌธ์ œ๋กœ ๋ณด์ธ๋‹ค. (๊ทธ๋ ‡๋‹ค๊ณ  ํ•˜๊ธฐ์—๋„ ์›Œ์ปค๊ฐ€ 1๊ฐœ์ผ๋•Œ๋„

python, db library benchmark (feat. sqlalchemy vs aiomysql)
benchmark

python, db library benchmark (feat. sqlalchemy vs aiomysql)

DB ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—์„œ ๋™๊ธฐ์ฒ˜๋ฆฌ (sqlalchemy) ๊ฐ€ ๋น„๋™๊ธฐ์ฒ˜๋ฆฌ (aiomysql) ํŠน์„ฑ์— ๋”ฐ๋ผ ์–ด๋–ค ์ฐจ์ด๊ฐ€ ์žˆ๋Š” ์ง€ ์‚ดํŽด๋ดค๋‹ค. ๋ฒค์น˜๋งˆํฌ ํ…Œ์ŠคํŠธ๋Š” Pool ์„ ๊ตฌ์„ฑํ•˜๊ณ  ์ฃผ์š” ์˜ต์…˜์ด๋‚˜ ๊ธฐ๋Šฅ์˜ ์ฐจ์ด๋ฅผ ์‚ดํŽด๋ณด๊ณ ์ž ํ–ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ ๋™๊ธฐ์ฒ˜๋ฆฌ๋Š” Pool ์—์„œ ํ•˜๋‚˜์”ฉ Connection์„ ์‚ฌ์šฉํ•˜๊ณ  ๋ฆฌํ„ดํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์ฒ˜๋ฆฌ ๋  ๊ฒƒ์ด๋ฉฐ, ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ๋Š” ๋น„๋™๊ธฐ๋กœ ๋‚ ๋ผ์˜ค๋Š” ์š”์ฒญ๋“ค์„ ๊ฐ€๋Šฅํ•œ Pool ์•ˆ์˜ Connection์„ ๊ฐ€์ ธ๋‹ค ์“ฐ๊ณ  ๋ฆฌํ„ดํ•˜๋Š” ๋ฐฉ์‹์„

FastAPI, CRUD API ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๊ธฐ๋ก
python

FastAPI, CRUD API ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๊ธฐ๋ก

API์— ์žˆ์–ด ๊ธฐ๋ณธ์ด ๋˜๋Š” CRUD API ๋ฅผ ๊ฐœ๋ฐœํ•˜๋ฉฐ FastAPI ์— ์ ์‘ํ•˜๊ธฐ ์œ„ํ•œ ๊ธฐ๋ก์„ ๋‚จ๊ธด๋‹ค. 1. ํ™˜๊ฒฝ์„ธํŒ… 1) ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ poetry new apps poetry ๋ฅผ ํ†ตํ•ด ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ๊ตฌ์กฐ๋ฅผ ๊ฐ–๊ฒŒ ๋œ๋‹ค. apps โ”œโ”€โ”€ pyproject.toml โ”œโ”€โ”€ README.rst โ”œโ”€โ”€ apps โ”‚ โ””โ”€โ”€ __init__.py โ””โ”€โ”€ tests โ”œโ”€โ”€ __init__.py โ””โ”€โ”€ test_apps.py 2) ์˜์กด์„ฑ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜

trouble shooting

fastapi 0.70.1, middleware bug

fastapi 0.70.1 ๋ฒ„์ „์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด middleware ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์— crash ๋˜๋Š” ๋ฒ„๊ทธ(๋ถ€ํ•˜๋ฐœ์ƒ๊ธฐ ์‚ฌ์šฉ์‹œ)๊ฐ€ ์กด์žฌํ•˜๋Š” ๋“ฏ ํ•˜๋‹ค. ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ์ „ ๋ฒ„์ „(0.70.0 ๋˜๋Š” 0.68.2)์œผ๋กœ ๋ณ€๊ฒฝ ํ›„ ๋™์ผ ๋ฒ„๊ทธ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Œ. from fastapi import FastAPI from starlette.requests import Request from app.db import

uvicorn 0.16.0 benchmark (feat. m1 mac)
benchmark

uvicorn 0.16.0 benchmark (feat. m1 mac)

uvicorn ์„œ๋ฒ„์˜ ์„ธ๊ฐ€์ง€ ์˜ต์…˜ ์„ค์ •์— ๋”ฐ๋ฅธ ์„ฑ๋Šฅ์„ ํ‰๊ฐ€ํ•ด๋ณด๊ณ ์ž ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ•จ 1.env * apple m1 macbook air, osx v.11.6.2 bigsur, memory 16GB * Running uvicorn 0.16.0 with CPython 3.9.7 on Darwin 2.options 1) workers ์ž‘์—…์ž ํ”„๋กœ์„ธ์Šค์˜ ์ˆ˜์ž…๋‹ˆ๋‹ค. ๊ธฐ๋ณธ๊ฐ’์€ $WEB_CONCURRENCY ํ™˜๊ฒฝ ๋ณ€์ˆ˜์ธ ๊ฒฝ์šฐ๋ฅผ ๋”ฐ๋ผ๊ฐ€๊ฑฐ๋‚˜

trouble shooting

minikube(feat. lima) ํ™˜๊ฒฝ์—์„œ ๋กœ์ปฌ ์ด๋ฏธ์ง€๋ฅผ ๊ฐ€์ ธ์˜ค์ง€ ๋ชปํ•˜๋Š” ๋ฌธ์ œ

๊ฐœ๋ฐœํ•œ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ด๋ฏธ์ง€๋ฅผ ์ง€๋‚œ ๊ธ€์—์„œ ๊ตฌ์ถ•ํ•œ minikube ย ํ™˜๊ฒฝ์— ์˜ฌ๋ ค ๋ณด๊ณ ์ž ํ•˜๋ฉด์„œ ๋ฌธ์ œ๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค. ํ™˜๊ฒฝ์ •๋ณด * silicon m1 mac * minikube version v1.24.0 * limactl 0.7.4 ๋กœ์ปฌ์—์„œ ๋นŒ๋“œํ•œ ์ด๋ฏธ์ง€๋ฅผ minikube ํ™˜๊ฒฝ์œผ๋กœ ๊ฐ€์ ธ ์˜ค๋ ค๋ฉด, ๊ฐ€์žฅ ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ•์ด ๋„์ปค host ์™€ minikube ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์ธ๋ฐ ๋‹ค์Œ๊ณผ ๊ฐ™์ด containerd runtime ์€ ์ง€์›์ด ์•ˆ๋˜๋Š”

ASGI ์›น ํ”„๋ ˆ์ž„์›Œํฌ FastAPI  ๋ฅผ ์‹œ์ž‘ํ•˜๋ฉฐ
python

ASGI ์›น ํ”„๋ ˆ์ž„์›Œํฌ FastAPI ๋ฅผ ์‹œ์ž‘ํ•˜๋ฉฐ

Python, Backend ๋ฅผ ์‹œ์ž‘ํ•˜๋Š” ๋ฐ ๋ถ€์กฑํ•œ ๋ถ€๋ถ„๋“ค์„ ์ •๋ฆฌํ•ด ๋ณด๊ณ ์ž ํ•œ๋‹ค. 1. Backend ๊ตฌ์„ฑ (feat. WSGI ์™€ ASGI) Python ์˜ ์ผ๋ฐ˜์ ์ธ ์›น์„œ๋น„์Šค์— ์•„ํ‚คํ…์ณ๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด ์•„๋ž˜์™€ ๊ฐ™์€ ๊ทธ๋ฆผ์„ ๊ทธ๋ ค๋ดค๋‹ค. 1) Web Server ์›น์„œ๋ฒ„์˜ ์—ญํ• ์€ ๋‘๊ฐœ๋กœ ๋‚˜๋ˆ„์–ด ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ์ •์ ์ธ ์š”์ฒญ์˜ ์„œ๋น™์ด๋‚˜ Reverse Proxy๋ฅผ ์ด์šฉํ•˜์—ฌ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„œ๋ฒ„๋กœ ๋™์ ์ธ ์š”์ฒญ์„ ์ „๋‹ฌํ•˜๋Š” ์šฉ๋„์ด๋‹ค.

Slicon M1 Mac์— Conda ๊ฐ€์ƒํ™˜๊ฒฝ ๋งŒ๋“ค๊ธฐ (feat. miniforge)
python

Slicon M1 Mac์— Conda ๊ฐ€์ƒํ™˜๊ฒฝ ๋งŒ๋“ค๊ธฐ (feat. miniforge)

conda๋Š” ์ฃผ๋กœ Python์˜ ๋ฒ„์ „๋ณ„ ๊ฐ€์ƒํ™˜๊ฒฝ๊ณผ ์˜์กด์„ฑ์ด๋‚˜ ํŒจํ‚ค์ง€๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํˆด์ž…๋‹ˆ๋‹ค. ๊ฐ„๋‹จํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋ฉด ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €์ด๋ฉด์„œ ํŒŒ์ด์ฌ์˜ ๋ฒ„์ „์„ ๊ณจ๋ผ ์„ค์น˜ ํ•  ์ˆ˜๋„ ์žˆ๋Š” ํˆด์ด๋ผ๊ณ  ๋ณด๋ฉด ๋œ๋‹ค. ๋Œ€ํ‘œ์ ์ธ conda ํ™˜๊ฒฝ์„ ๋งŒ๋“ค์–ด์ฃผ๋Š” ํ”„๋กœ๊ทธ๋žจ์€ Anaconda(anaconda ์ฑ„๋„), miniconda(anaconda ์ฑ„๋„), miniforge(conda-forge ์ปค๋ฎค๋‹ˆํ‹ฐ ์ฑ„๋„)๊ฐ€ ์žˆ๊ณ , Anaconda๋Š” 5G ์ •๋„ ๋˜๋Š” ํŒจํ‚ค์ง€๋ฅผ ๋™์‹œ์— ์„ค์น˜ํ•˜๋Š” ๋‹ค์†Œ ๋ฌด๊ฑฐ์šด ํ™˜๊ฒฝ์„

Slicon M1 Mac์—์„œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ (feat. lima+minikube)
kubernetes

Slicon M1 Mac์—์„œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํ™˜๊ฒฝ ๊ตฌ์ถ•ํ•˜๊ธฐ (feat. lima+minikube)

์ง€๋‚œ ๊ธ€ ์—์„œ๋Š” Lima ๋ฅผ ํ™œ์šฉํ•˜์—ฌ docker ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•ด ๋ณด์•˜๊ณ  ์ด๋ฒˆ์—๋Š” lima ๋ฅผ minikube์˜ ๋“œ๋ผ์ด๋ฒ„๋กœ ์„ค์ •ํ•˜์—ฌ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•ด๋ณด๊ธฐ๋กœ ํ–ˆ๋‹ค. 1. Lima ๊ตฌ๋™ limactl start export DOCKER_HOST=unix://$HOME/docker.sock docker ps 2. minikube ์„ค์น˜ brew install minikube # docker ๋“œ๋ผ์ด๋ฒ„์— containerd๋ฅผ ์ปจํ…Œ์ด๋„ˆ ๋Ÿฐํƒ€์ž„์œผ๋กœ ์‚ฌ์šฉํ•˜์—ฌ kube ํ™˜๊ฒฝ๊ตฌ์ถ• minikube start

Slicon M1 Mac์—์„œ Lima๋กœ Docker Desktop ๋Œ€์ฒด ํ•˜๊ธฐ
docker

Slicon M1 Mac์—์„œ Lima๋กœ Docker Desktop ๋Œ€์ฒด ํ•˜๊ธฐ

์ด ๊ธ€์€ ๊ฝค ์˜ค๋ž˜๋œ ๊ธ€์ด๊ณ  ํ˜„์žฌ (23๋…„ 10์›”) ๋Š” OrbStack ยท Fast, light, simple Docker & Linux on macOS ๋ผ๋Š” ํˆด์„ ์“ฐ๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•œ๋‹ค. ์ง€๋‚œ ๊ธ€ ์—์„œ๋Š” Silicon Mac ์„ ์ง€์›ํ•˜๋Š” UTM ์ด๋ผ๋Š” ์˜คํ”ˆ์†Œ์Šค VM์— Ubuntu ๋ฅผ ์„ค์น˜ํ•˜์—ฌ Docker ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ๊ตฌ์ถ• ํ–ˆ๋Š” ๋ฐ, ์ด๋ฒˆ์—๋Š” Silicon Mac ์„ ์ง€์›ํ•˜๋Š” Lima ๋ผ๋Š” Linux VM

Silicon M1 Mac์—์„œ UTM์œผ๋กœ Docker Desktop ๋Œ€์ฒด ํ•˜๊ธฐ
docker

Silicon M1 Mac์—์„œ UTM์œผ๋กœ Docker Desktop ๋Œ€์ฒด ํ•˜๊ธฐ

์ด ๊ธ€์€ ๊ฝค ์˜ค๋ž˜๋œ ๊ธ€์ด๊ณ  ํ˜„์žฌ (23๋…„ 10์›”) ๋Š” OrbStack ยท Fast, light, simple Docker & Linux on macOS ๋ผ๋Š” ํˆด์„ ์“ฐ๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•œ๋‹ค. Docker Desktop ์˜ ์œ ๋ฃŒ์ „ํ™˜ ์†Œ์‹์ด ์žˆ์—ˆ๊ณ  22๋…„ 1์›” ๋ง๊นŒ์ง€ ์œ ์˜ˆ๊ธฐ๊ฐ„์„ ๋‘”๋‹ค๊ณ  ํ•œ๋‹ค. ๊ทธ ์„ฑ๋Šฅ์ด ์–ด๋– ํ•˜๋“  ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ• ๋•Œ ํ•„์ˆ˜์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์ด๋ผ ์•„์‰ฌ์›€์ด ๋งŽ์ด ๋‚จ๋Š”๋‹ค. Mac ํ™˜๊ฒฝ์—์„œ ๊ฐœ๋ฐœ์„ ํ•ด์•ผํ•˜๋Š” ํšŒ์‚ฌ๋“ค์€

Makefile

ShellScript ์™€ Makefile

์ด๋ฒˆ์— ShellScript ์™€ ๊ฐ™์ด ์ •๋ฆฌํ•ด๋ณด๋ ค๋Š” Makefile ์˜ ๊ฒฝ์šฐ, ๋ณดํ†ต C ๋กœ ์ž‘์„ฑ๋œ ์†Œ์Šค๋ฅผ ์˜์กด์„ฑ์„ ๊ธฐ์ˆ ํ•˜์—ฌ make ๋ผ๋Š” ๋ช…๋ น์–ด๋กœ ์ปดํŒŒ์ผ์„ ๋„์™€์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ๋‹ค. ์š”์ฆ˜ go ์—์„œ makefile ์„ ํ™œ์šฉํ•˜๋Š” ๋ช‡๊ฐ€์ง€ ๊ธ€๋“ค์„ ์ ‘ํ•˜๋ฉด์„œ ShellScript ๋ณด๋‹ค ์ฒด๊ณ„์ ์ด๊ณ  ๊น”๋”ํ•˜๊ฒŒ ๋Š๊ปด์ ธ์„œ ์ด์ œ๋Š” ๋Œ€๋ถ€๋ถ„์„ makefile ๋กœ ์ž๋™ํ™” ์ž‘์—…์„ ํ•˜๊ณ  ์žˆ๋‹ค. ์ด ๊ธ€์—์„œ๋Š” ShellScript ์™€ Makefile ์–ด๋Š ๊ฒƒ์ด

go versioning

Go ํŒจํ‚ค์ง€ ์ƒ์„ฑ์—์„œ ๋ฒ„์ „๊ด€๋ฆฌ ๊นŒ์ง€

GitHub ์—์„œ์˜ go ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ๊ณผ versioning ๊ณผ์ •์„ ์ฝ”๋“œ๋กœ ์ •๋ฆฌํ•ด ๋ณด๊ณ ์ž ํ•œ๋‹ค. ์œ ์˜์  ๋ฒ„์ „ 2.0.0 | Semantic Versioning https://github.com/golang-standards/project-layout Semantic ๋ฒ„์ „๊ด€๋ฆฌ Go์—์„œ๋Š” ํŒจํ‚ค์ง€ ๋ฒ„์ €๋‹์„ ์œ„ํ•ด Semantic Versioning์„ ์‚ฌ์šฉํ•˜๊ธธ ์ œ์•ˆํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ๊ฐ„๋‹จํ•˜๊ฒŒ ์ •๋ฆฌ๋ฅผ ํ•˜์ž๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. * ~๊ธฐ์กด ๋ฒ„์ „๊ณผ ๋น„ํ˜ธํ™˜~ ๋˜๋ฉฐ API๊ฐ€ ๋ฐ”๋€Œ๋ฉด โ€œMAJOR ๋ฒ„์ „โ€์„ ์˜ฌ๋ฆฌ๊ณ , * ~๊ธฐ์กด

go modules

Go Modules ๊ฐˆ์•„ํƒ€๊ธฐ

go 1.11.1 ์ด ๋‚˜์˜ค๊ธฐ ์ „์—๋Š” dep ์ด๋ผ๋Š” ์˜์กด์„ฑ ๊ด€๋ฆฌํˆด์„ ์‚ฌ์šฉํ–ˆ๊ณ , ์ด๋ฒˆ์— 1.11.1 ์ด ๋‚˜์˜ค๋ฉด์„œ modules ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด ์ ์šฉํ•ด ๋ณด๋ คํ•œ๋‹ค. go modules ๋Š” go mod ๋ผ๋Š” go ๋ช…๋ น์–ด๋กœ ์‚ฌ์šฉ๊ฐ€๋Šฅ ํ•˜๋ฉฐ, ์•„๋ž˜์™€ ๊ฐ™์€ ์˜ต์…˜์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋‹ค. * go mod init ๋ชจ๋“ˆ์ด๋ฆ„ : ํŒจํ‚ค์ง€ ์ดˆ๊ธฐํ™” * go mod tidy : ํŒจํ‚ค์ง€ ์ •๋ฆฌ, ํŒจํ‚ค์ง€