Skip to content

doc: Minor edit enhancement for go tour example #29 #3380

@MichaelTJones

Description

@MichaelTJones
Go Tour example 29 contains the latitude and longitude of Bell Labs. They are stored in
a Vertex type defined as:

type Vertex struct {
    Lat, Long float64
}

and given as:

Vertex{
    40.68433, 74.39967,
}

This is all just fine. Works fine, is a cute homage, etc. However latitude is
interpretable as north or south and longitude as east or west, and only one of these
combinations maps to New Jersey.

A subtle change would be to retate the type definition as:

type Vertex struct {
    Lat, Long float64   // North,West
}

That will guide curious readers to the intended location:
http://maps.google.com/maps?q=40.68433N,74.39967W

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions