일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- esbuild
- 구조체
- MSA
- AI
- Intellij
- context7
- logging
- 티스토리챌린지
- Kubernetes
- elasticsearch
- sqs fifo queue
- database/sql
- Infra
- golang
- goland
- RDS
- 캡슐화
- 디자인패턴
- AWS
- replication lag
- go
- GoF
- 관측 가능성
- 오블완
- typescript
- GIT
- blank import
- go-sql-driver
- 통합 로깅 시스템
- javascript
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