Elements. Build native projects for any modern development platform, using the language(s) of your choice. Oxygene (Object Pascal), C#, Swift, Java, Go. | RemObjects Software

maps

Language: Gold, Platform: Echoes, Category: Tour of Go
https://github.com/remobjects/ElementsSamples/tree/master/Gold/Echoes/Tour of Go/maps

  • maps.Echoes
    • References
      • #
    • Source Files
    • Other Files

maps.go

// Ignored build directive: +build OMIT

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"])
}