Commit 813a903
Fix tests on Go 1.12 (#207)
* Fix format error in tests
When running the tests on Go 1.12, we get the following error:
> ./search_test.go:27:4: Fatalf format %s has arg executedEntry of wrong type *github.com/go-ldap/ldap.Entry
This patch fixes this by using the correct format verb.
* Makefile: Clarify which Go version support the `-race` flag
This patch updates the comment for the `RACE_FLAG` variable, to
indicate which Go version it is supported on.
* Makefile: Test for Go versions using release tags
Go doesn't really provide a stable interface to get its version. `go
version` fails when using `tip`.
This patch adds version detection using the release tags list. This
list is populated with a tag for each release of Go.
See: https://github.com/golang/go/blob/go1.12/src/go/build/build.go#L295-L305
* Makefile: Use Go version to check for `go tool vet`
Instead of checking for `go tool vet` using `go tool -n vet`, use a
version test.
This makes the Makefile more readable, and will also make it easier to
change the behavior for newer versions of Go.
* Makefile: Fix `go vet` on Go version 1.12
Go version 1.12 does not allow `go vet` to be run through `go tool
vet`. Instead we must run `go vet`.
In addition the experimental `-shadow` option has been removed, so
that check is not executed when running `go vet`.
See: https://golang.org/doc/go1.12#vet
* Travis CI: Run tests on Go 1.12
This patch adds Go 1.12 to the test matrix.1 parent 214f299 commit 813a903
3 files changed
+38
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
13 | 44 | | |
14 | 45 | | |
15 | 46 | | |
| |||
34 | 65 | | |
35 | 66 | | |
36 | 67 | | |
37 | | - | |
38 | 68 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 69 | + | |
56 | 70 | | |
57 | 71 | | |
58 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments