일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 스코프
- golang pointer
- 패스트캠퍼스
- 상수
- 타입
- 패스트캠퍼스업스테이지부트캠프
- 업스테이지패스트캠퍼스
- receiver method
- 패스트캠퍼스AI부트캠프
- golang slice remove
- golang slice
- UpstageAILab
- golang
- 함수
- scope
- array
- 패스트캠퍼스업스테이지에이아이랩
- slice
- golang array
- keyword
- struct
- 변수
- package
- Interface
- receiver
- 메서드
- golang interface
- Pointer
- method
- 국비지원
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