"Go 맵"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
24번째 줄: 24번째 줄:


==같이 보기==
==같이 보기==
{{z컬럼3|
* [[Go 배열]]
* [[Go 구조체]]
* [[Go 슬라이스 맵]]
* [[Go 맵 리터럴]]
* [[Go 맵 리터럴]]
* [[Go 구조체]]
* [[Go 맵 슬라이스]]
* [[Go 배열]]
}}


==참고==
==참고==

2021년 11월 24일 (수) 18:15 판

1 개요

Go Map
Go 맵
package main

import "fmt"

type Vertex struct {
	Lat, Long float64
}

var m map[string]Vertex

func main() {
	m = make(map[string]Vertex)
	m["Bell Labs"] = Vertex{
		40.68433, -74.39967,
	}
	fmt.Println(m["Bell Labs"])
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}