일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 대규모 시스템 설계
- goroutine
- Lambda@Edge
- Infra
- 클래스 관계
- Bastion Server
- 디자인패턴
- GoF
- notification system
- Logrus
- Buffered channel
- AWS
- golang
- Live Template
- Kubernetes
- GoF 디자인패턴
- 윈도우키보드
- System Design
- AWS Infra
- tenneling
- go
- gitops
- image resizing
- 시스템 설계
- UnBuffered channel
- argocd
- Helm V3
- 컴포지트패턴
- Golines
- 알림 시스템
- Today
- Total
목록2020/09 (2)
Fall in IT.
안녕하세요. 오늘은 Golang에서 JSON 인코딩 / 디코딩을 사용하여 json object를 string으로 혹은 json string을 object 형태로 변환하는 방법에 대해서 알아보도록 하겠습니다. 소스코드 package main import ( "encoding/json" "fmt" ) // Person - 사람 정보 type Person struct { Name string Age int Sex int // 0: 여자, 1: 남자 } func main() { fmt.Println("Say hi!") // 1. CONVERT JSON OBEJCT TO STRING fmt.Println("\n1.CONVERT JSON OBEJCT TO STRING") var personA = Person{"Al..
안녕하세요. 오늘은 Golang에서 숫자(int)인 문자열을 숫자(int)로 변경하기 등 자주 사용되는 data parsing 방법에 대해서 알아보겠습니다. package main import ( "fmt" "reflect" "strconv" ) func main() { fmt.Println("say hi") // 1. int to string - 숫자(정수)를 문자열로 변환 a := strconv.Itoa(100) fmt.Println("a: ", a) // a: 100 fmt.Println("type a: ", reflect.TypeOf(a)) // type a: string // 1-1. int to string - 100을 10진수 문자열로 변환 aa := strconv.FormatInt(100,..