본문 바로가기

아카이브/항해99 취업 리부트 코스 학습일지

[항해99 취업 리부트 코스 학습일지] PubArt - Health Check💊

728x90

 

 

이번 주 목표

GO API 1

Spring Lecture

오늘 목표

GO start

Spring Lecture

오늘 한 것

Go API 1

오늘 스케줄

6:00 GO 

         Spring

 

1. http Handler 분기

앞에 api > 백엔드 핸들러

앞에 api 아님 > 프론트엔드 핸들러

func IsApi(path string) bool {
	paths := strings.Split(path, "/")
	if paths[1] == "api" {
		return true
	} else {
		return false
	}
}

2. Empty Branch

3. Table CREATE SQL 

4. invoke

함수를 대신 호출해 줄 때 invoke 하였다고 표현

call은 포괄적인 의미

 

5. Marshaling 함수 

func WriteWith(data interface{}, w http.ResponseWriter) {
	jsonData, err := json.Marshal(data)
	if err != nil {
		fmt.Println("JSON encoding failed:", err)
		return
	}
	w.Header().Set("Content-Type", "application/json")
	w.Write(jsonData)
}

정리 

Empty Branch

 

 

KPT

Keep

열심히 하려고 하는 것

Problem

잠이 많은 것

Try

잠죽자

소감

잠죽자