Skip to content
Permalink
Browse files

fix linter errors

  • Loading branch information...
paulmach committed Mar 9, 2018
1 parent 287993c commit e6f867ff804cfc21e6ed1ab2228b351a09edd621
Showing with 10 additions and 10 deletions.
  1. +3 −3 internal/mputil/mputil_test.go
  2. +1 −1 note.go
  3. +1 −1 osm.go
  4. +1 −1 osmgeojson/convert_test.go
  5. +3 −3 osmpbf/example_stats_test.go
  6. +1 −1 way_test.go
@@ -214,11 +214,11 @@ func TestGroup(t *testing.T) {
}

ways := map[osm.WayID]*osm.Way{
1: &osm.Way{ID: 1, Nodes: osm.WayNodes{
1: {ID: 1, Nodes: osm.WayNodes{
{Lat: 1.0, Lon: 2.0},
{Lat: 2.0, Lon: 3.0},
}},
2: &osm.Way{ID: 1, Nodes: osm.WayNodes{
2: {ID: 1, Nodes: osm.WayNodes{
{Lat: 3.0, Lon: 4.0},
{Lat: 4.0, Lon: 5.0},
}},
@@ -260,7 +260,7 @@ func TestGroup_zeroLengthWays(t *testing.T) {
{Type: osm.TypeWay, Ref: 1, Role: "inner", Orientation: orb.CCW},
},
map[osm.WayID]*osm.Way{
1: &osm.Way{ID: 1},
1: {ID: 1},
},
time.Time{},
)
@@ -52,7 +52,7 @@ func (d Date) MarshalJSON() ([]byte, error) {
// Notes is a collection of notes with some helpers attached.
type Notes []*Note

// Note is infomation for other mappers dropped at a map location.
// Note is information for other mappers dropped at a map location.
type Note struct {
XMLName xmlNameJSONTypeNote `xml:"note" json:"type"`
ID NoteID `xml:"id" json:"id"`
2 osm.go
@@ -97,7 +97,7 @@ func (o *OSM) Elements() Elements {
return result
}

// Objects retuns an array of objects containing any nodes, ways, relations,
// Objects returns an array of objects containing any nodes, ways, relations,
// changesets, notes and users.
func (o *OSM) Objects() Objects {
if o == nil {
@@ -530,7 +530,7 @@ func TestBuildRouteLineString(t *testing.T) {
osm: &osm.OSM{},
skippable: map[osm.WayID]struct{}{},
wayMap: map[osm.WayID]*osm.Way{
2: &osm.Way{
2: {
ID: 2,
Nodes: osm.WayNodes{
{ID: 1, Lat: 1, Lon: 2},
@@ -164,9 +164,9 @@ type idRange struct {
func newElementStats() *elementStats {
return &elementStats{
Ranges: map[osm.Type]*idRange{
osm.TypeNode: &idRange{Min: math.MaxInt64},
osm.TypeWay: &idRange{Min: math.MaxInt64},
osm.TypeRelation: &idRange{Min: math.MaxInt64},
osm.TypeNode: {Min: math.MaxInt64},
osm.TypeWay: {Min: math.MaxInt64},
osm.TypeRelation: {Min: math.MaxInt64},
},
}
}
@@ -363,7 +363,7 @@ func TestWayNodes_UnmarshalJSON(t *testing.T) {
wn := WayNodes{}

if err := wn.UnmarshalJSON([]byte("[asdf,]")); err == nil {
t.Errorf("should return error whn json is invalid")
t.Errorf("should return error when json is invalid")
}

json := []byte(`[1,2,3,4]`)

0 comments on commit e6f867f

Please sign in to comment.
You can’t perform that action at this time.