Skip to content

Commit 70830f8

Browse files
authored
Add go modules support (#10)
1 parent b01f40c commit 70830f8

File tree

13 files changed

+52
-35
lines changed

13 files changed

+52
-35
lines changed

.travis.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
language: go
22

33
go:
4-
- "1.10.x"
5-
- master
4+
- "1.14.x"
5+
- "1.13.x"
6+
- master
67

7-
before_install:
8-
- go get -t -v ./...
9-
10-
install:
11-
- go get -d -v ./...
8+
env:
9+
- GO111MODULE=on
1210

1311
script:
14-
- go test -v -coverprofile=coverage.txt -covermode=atomic ./...
12+
- go test -v -coverprofile=coverage.txt -covermode=atomic ./...
1513

1614
after_success:
17-
- bash <(curl -s https://codecov.io/bash)
15+
- bash <(curl -s https://codecov.io/bash)

go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/kyroy/kdtree
2+
3+
go 1.13
4+
5+
require (
6+
github.com/jupp0r/go-priority-queue v0.0.0-20160601094913-ab1073853bde
7+
github.com/kyroy/priority-queue v0.0.0-20180327160706-6e21825e7e0c
8+
github.com/stretchr/testify v1.4.0
9+
)

go.sum

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/jupp0r/go-priority-queue v0.0.0-20160601094913-ab1073853bde h1:+5PMaaQtDUwOcJIUlmX89P0J3iwTvErTmyn5WghzXAQ=
4+
github.com/jupp0r/go-priority-queue v0.0.0-20160601094913-ab1073853bde/go.mod h1:RDgD/dfPmIwFH0qdUOjw71HjtWg56CtyLIoHL+R1wJw=
5+
github.com/kyroy/priority-queue v0.0.0-20180327160706-6e21825e7e0c h1:1c7+XOOGQ19cXjZ1Ss/irljQxgPvb+8z+jNEprCXl20=
6+
github.com/kyroy/priority-queue v0.0.0-20180327160706-6e21825e7e0c/go.mod h1:R477L6j2/dUcE0q0aftk0kR5Xt93W7g1066AodcJhEo=
7+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
8+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9+
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
10+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
11+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
12+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
13+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
14+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
15+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
16+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

kdrange/range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

kdrange/range_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,10 +17,9 @@
1717
package kdrange_test
1818

1919
import (
20-
"testing"
21-
2220
"github.com/kyroy/kdtree/kdrange"
2321
"github.com/stretchr/testify/assert"
22+
"testing"
2423
)
2524

2625
func TestNewRange(t *testing.T) {

kdtree.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,11 +19,10 @@ package kdtree
1919

2020
import (
2121
"fmt"
22-
"math"
23-
"sort"
24-
2522
"github.com/kyroy/kdtree/kdrange"
2623
"github.com/kyroy/priority-queue"
24+
"math"
25+
"sort"
2726
)
2827

2928
// Point specifies one element of the k-d tree.

kdtree_test.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,16 +17,15 @@
1717
package kdtree_test
1818

1919
import (
20-
"math"
21-
"math/rand"
22-
"testing"
23-
"time"
24-
2520
"github.com/jupp0r/go-priority-queue"
2621
"github.com/kyroy/kdtree"
2722
"github.com/kyroy/kdtree/kdrange"
2823
. "github.com/kyroy/kdtree/points"
2924
"github.com/stretchr/testify/assert"
25+
"math"
26+
"math/rand"
27+
"testing"
28+
"time"
3029
)
3130

3231
func TestNew(t *testing.T) {

points/point.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

points/point2d.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

points/point2d_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 Dennis Kuhnert
2+
* Copyright 2020 Dennis Kuhnert
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,10 +17,9 @@
1717
package points_test
1818

1919
import (
20-
"testing"
21-
2220
"github.com/kyroy/kdtree/points"
2321
"github.com/stretchr/testify/assert"
22+
"testing"
2423
)
2524

2625
func TestPoint2D_Dimensions(t *testing.T) {

0 commit comments

Comments
 (0)