일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- UpstageAILab
- package
- 상수
- receiver method
- 패스트캠퍼스AI부트캠프
- scope
- golang slice
- 메서드
- struct
- receiver
- golang interface
- slice
- 패스트캠퍼스업스테이지에이아이랩
- 함수
- array
- method
- 타입
- 변수
- keyword
- golang
- 패스트캠퍼스
- golang pointer
- 업스테이지패스트캠퍼스
- golang array
- 스코프
- 패스트캠퍼스업스테이지부트캠프
- Interface
- 국비지원
- golang slice remove
- Pointer
Archives
- Today
- Total
목록상수 (1)
느리지만 꾸준히, 코딩
Golang Constants(상수)
상수란?상수는 프로그램 실행 중 변경되지 않는 고정된 값을 나타냅니다. 상수 정의Golang에서 상수는 const 키워드를 사용하여 정의합니다.const Pi = 3.14159const MaxUsers = 100const Greeting = "Hello, World!" 여러 상수를 그룹으로 정의할 수도 있습니다const ( StatusOK = 200 StatusNotFound = 404 StatusInternalServerError = 500)타입이 있는 상수와 없는 상수1. 타입이 없는 상수const MaxValue = 100 2. 타입이 있는 상수const MaxValue int = 10 타입이 없는 상수는 더 유연하게 사용할 수 있으며, 필요에 따라 암시적으로 타입 변환이 가능합니다..
프로그래밍/Golang
2024. 7. 20. 09:00