Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- channel
- Python
- bitcoin
- windows
- Close
- write
- GO 언어
- window
- JavaScript
- Linux
- 리뷰
- FOR
- Golang
- Sync
- install
- go언어
- File
- go
- 책
- Callback
- http
- range
- mutex
- API
- json
- package
- C
- tcp
- 영화
- c++
Archives
- Today
- Total
목록인터페이스 (1)
Code Habit
Go ) interface
인터페이스는 메서드 집합이다. 단 인터페이스는 메서드 자체를 구현하지는 않는다. type 인터페이스명 interface {} 인터페이스 정의 예제이다. 1 2 3 4 5 6 7 8 9 10 11 package main import "fmt" type hello interface { // 인터페이스 정의 } func main() { var h hello // 인터페이스 선언 fmt.Println(h) // nil: 빈 인터페이스이므로 nil이 출력됨 } 메서드를 가지는 인터페이스를 정의해 보자. type 인터페이스명 interface { 메서드 } 인터페이스 활용 예제이다. 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..
카테고리 없음
2020. 6. 5. 10:01