A Tour of Go Map literals
2024-09-01 09:36:25
Map literals are like struct literals, but the keys are required.
package main import "fmt" type Vertex struct {
Lat, Long float64
} var m = map[string]Vertex {
"Bell Labs": Vertex {
40.6833, -74.39967,
},
"Google": Vertex{
37.42202, -122.08408,
},
} func main() {
fmt.Println(m)
}
最新文章
- WebForm Repeater Response以及 地址栏
- js小知识归纳(待续)
- linux初体验
- 使用 jsPlumb 绘制拓扑图 —— 异步加载与绘制的实现
- 重装windows7企业版时提示“安装程序无法创建新的系统分区,也无法定位现有系统
- 【转】【C#】【Thread】Mutex 互斥锁
- ZooKeeper应用场景
- The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
- python 装饰器简介
- PAT (Advanced Level) 1008. Elevator (20)
- C#中 什么是装箱和拆箱
- 关于限制DHCP服务器广播的另类方法
- Python学习日记:day1
- es6属性基础教学,30分钟包会
- QUARTZ系列之零:概述
- 5、python的变量和常量
- 134. Gas Station加油站
- [Unity基础]镜头管理类
- Linux装python3
- exec命令详解