go1 Go 학습하기 - 흐름 제어 package mainimport "fmt"func main() { var ( healthyCnt int warningCnt int crashloopCnt int ) const total = 10 for i := 1; i = 0.8 { fmt.Printf("cluster OK (%.1f%% healthy)\n", ratio*100) } else { fmt.Printf("cluster DEGRADED (%.1f%% healthy)\n", ratio*100) } for ready, step := 0, 0; ready // 실행결과pod-1: restarts=3 CrashLooppod-2: restarts=6 CrashLooppod-3: restarts=2 Warningpod-4: restar.. 2026. 10. 8. 이전 1 다음 반응형