일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 네트워크 설정
- /etc/network/interfaces
- 선형대수
- 자바편
- 처음 만나는 AI수학 with Python
- resttemplate
- Kernighan의 C언어 프로그래밍
- d
- 친절한SQL튜닝
- 스프링부트핵심가이드
- 처음 만나는 AI 수학 with Python
- 페이징
- 목록처리
- baeldung
- 서버설정
- 이터레이터
- 자료구조와 함께 배우는 알고리즘 입문
- iterator
- 리눅스
- 티스토리 쿠키 삭제
- network configuration
- 데비안
- ㅒ
- GIT
- 알파회계
- 코드로배우는스프링웹프로젝트
- 스프링 시큐리티
- 코드로배우는스프링부트웹프로젝트
- 자료구조와함께배우는알고리즘입문
- 구멍가게코딩단
- Today
- Total
목록Language (44)
bright jazz music
어카운트package accountsimport "errors"//Account structtype Account struct { owner string balance int}var errNoMoney = errors.New("Can't witdhraw") //에러의 변수명은 err로 시작해야 함//NewAccount creates Accountfunc NewAccount(owner string) *Account { account := Account{owner: owner, balance: 0} return &account //사본 말고 메모리 주소 반환}//Deposit x amount on your accountfunc (a *Account) Deposit(amount int) { //메소드임. ..
캡슐화package accounts//Account structtype Account struct { owner string balance int}//NewAccount creates Accountfunc NewAccount(owner string) *Account { account := Account{owner: owner, balance: 0} return &account //사본 말고 메모리 주소 반환} 메인 package mainimport ( "fmt" "github.com/hojuncha997/learngo/accounts")func main() { account := accounts.NewAccount("hojun") fmt.Println(account)}===&{hojun 0} //사본..
package mainimport ( "fmt")type person struct { name string age int favFood []string}func main() { favFood := []string{"kimchi", "pizza"} nico := person{"nico", 18, favFood} fmt.Println(nico) //nico.name 이런 것도 됨. //어쨌든 이런 방식의 입력은 권장되지 않음}==={nico 18 [kimchi pizza]} //두 번째 방법package mainimport ( "fmt")type person struct { name string age int favFood []string}func main() { fa..
package mainimport ( "fmt")func main() { nico := map[string]string{"name": "nico", "age": "12"} //[key] [value] fmt.Println(nico)}//자바스크립트나 파이선의 오브젝트와 유사함. 같지는 않음 package mainimport ( "fmt")func main() { nico := map[string]string{"name": "nico", "age": "12"} //[key] [value] for key, _ := range nico { fmt.Println(key) }}===nameage package mainimport ( "fmt")func main() { nico := map[string]s..