Skip to content
Snippets Groups Projects
Unverified Commit da24f3e6 authored by Antoine Leroyer's avatar Antoine Leroyer
Browse files

Linting, removing non-used variables and removed travis-ci

parent be6c7da8
No related branches found
No related tags found
No related merge requests found
language: go
go:
- 1.4
install:
- go get github.com/digitalocean/rsyslog_exporter
script:
- make test
......@@ -79,7 +79,7 @@ func TestDynStatToPoints(t *testing.T) {
}
seen := map[string]bool{}
for name, _ := range wants {
for name := range wants {
seen[name] = false
}
......
......@@ -104,7 +104,7 @@ func TestDynafileCacheToPoints(t *testing.T) {
}
seen := map[string]bool{}
for name, _ := range wants {
for name := range wants {
seen[name] = false
}
......
package main
import (
"errors"
"fmt"
"github.com/prometheus/client_golang/prometheus"
......@@ -14,11 +13,6 @@ const (
gauge
)
var (
ErrIncompatiblePointType = errors.New("incompatible point type")
ErrUnknownPointType = errors.New("unknown point type")
)
type point struct {
Name string
Description string
......
......@@ -7,7 +7,7 @@ import (
)
var (
ErrPointNotFound = errors.New("point does not exist")
errPointNotFound = errors.New("point does not exist")
)
type pointStore struct {
......@@ -25,7 +25,7 @@ func newPointStore() *pointStore {
func (ps *pointStore) keys() []string {
ps.lock.Lock()
keys := make([]string, 0)
for k, _ := range ps.pointMap {
for k := range ps.pointMap {
keys = append(keys, k)
}
sort.Strings(keys)
......@@ -48,5 +48,5 @@ func (ps *pointStore) get(name string) (*point, error) {
return p, nil
}
ps.lock.Unlock()
return &point{}, ErrPointNotFound
return &point{}, errPointNotFound
}
......@@ -86,7 +86,7 @@ func TestPointStore(t *testing.T) {
}
_, err = ps.get("no point")
if err != ErrPointNotFound {
if err != errPointNotFound {
t.Error("getting non existent point should raise error")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment