일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- gitops
- tenneling
- AWS
- golang
- Helm V3
- 대규모 시스템 설계
- Infra
- Buffered channel
- GoF
- Logrus
- notification system
- 클래스 관계
- 시스템 설계
- 디자인패턴
- 알림 시스템
- Lambda@Edge
- goroutine
- System Design
- 컴포지트패턴
- go
- Live Template
- Golines
- Bastion Server
- UnBuffered channel
- Kubernetes
- image resizing
- AWS Infra
- GoF 디자인패턴
- argocd
- 윈도우키보드
Archives
- Today
- Total
목록2022/05/02 (1)
Fall in IT.
Go 1.18버전부터 추가 된 generic 사용해보기
안녕하세요. 오늘은 Go 1.18 버전에서 추가 된 generic을 사용해보도록 하겠습니다. Generic에 대한 개념은 여기서 확인해주시기 바랍니다. Generic 사용 전 (source code) interface를 사용하여 스택을 구현한 경우 package main import "fmt" type stack struct { data []interface{} } type Stack interface { Push(data interface{}) Pop() interface{} Get() []interface{} } func New() Stack { return &stack{ data: []interface{}{}, } } func (s *stack) Push(data interface{}) { fmt...
프로그래밍언어/Golang
2022. 5. 2. 15:53