| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- container
- App.vue
- emit
- Refactoring
- todo-list
- toggle
- golang
- TODO
- PROPS
- goroutines
- component
- Vue.js
- method
- Matrix
- reactivity
- URL
- map
- graceful shutdown
- 행렬
- goroutine
- cli
- localStorage
- CDN
- go
- websocket
- Dictionary
- Vue
- SFC
- channel
- Server
Archives
- Today
- Total
목록Update (1)
ksundev 님의 블로그
안녕하세요. 이번 포스트에서는 저번 포스트에 이어 Dictionary의 Update, Delete 메서드를 만들어봅시다.# Update()먼저 Search()를 통해 Update하려는 keyword가 있는지 확인해야 합니다. 그리고 적절한 에러처리를 해줍시다.# mydict.govar errCantUpdate = errors.New("can't update non-existing word")// Update a word in the dictionaryfunc (d Dictionary) Update(word, def string) error { _, err := d.Search(word) switch err { case errNotFound: return errCantUpdate case nil: d[..
[개발] Go/초급 프로젝트
2025. 6. 26. 15:29