Skip to content

Commit f5977c2

Browse files
committed
chore: enable linting of package import order, and fix existing issues
1 parent 5fef1bf commit f5977c2

29 files changed

+58
-34
lines changed

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ linters:
55
# - gosimple
66
- govet
77
- gofmt
8-
# - gci
8+
- gci
99
# - revive
1010
# - ineffassign
1111
# - staticcheck

internal/auth/csp_service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package auth
22

33
import (
4-
"github.com/wavefronthq/wavefront-sdk-go/internal/auth/csp"
54
"log"
65
"net/http"
76
"sync"
87
"time"
8+
9+
"github.com/wavefronthq/wavefront-sdk-go/internal/auth/csp"
910
)
1011

1112
type tokenResult struct {

internal/auth/csp_service_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package auth
22

33
import (
4-
"github.com/stretchr/testify/assert"
5-
"github.com/wavefronthq/wavefront-sdk-go/internal/auth/csp"
64
"net/http"
75
"net/http/httptest"
86
"testing"
97
"time"
8+
9+
"github.com/stretchr/testify/assert"
10+
"github.com/wavefronthq/wavefront-sdk-go/internal/auth/csp"
1011
)
1112

1213
func TestCSPService_MultipleCSPRequests(t *testing.T) {

internal/auth/ticker_interval_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package auth
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
65
"time"
6+
7+
"github.com/stretchr/testify/assert"
78
)
89

910
func TestCalculateNewTickerInterval(t *testing.T) {

internal/event/formatter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package event
33
import (
44
"encoding/json"
55
"fmt"
6+
"strconv"
7+
68
"github.com/wavefronthq/wavefront-sdk-go/event"
79
"github.com/wavefronthq/wavefront-sdk-go/internal"
8-
"strconv"
910
)
1011

1112
// Line encode the event to a wf proxy format

internal/histogram/formatter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import (
44
"bytes"
55
"errors"
66
"fmt"
7+
"strconv"
8+
79
"github.com/wavefronthq/wavefront-sdk-go/histogram"
810
"github.com/wavefronthq/wavefront-sdk-go/internal"
9-
"strconv"
1011
)
1112

1213
// Gets a histogram line in the Wavefront histogram data format:

internal/histogram/formatter_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package histogram
22

33
import (
4+
"testing"
5+
46
"github.com/stretchr/testify/assert"
57
"github.com/wavefronthq/wavefront-sdk-go/histogram"
6-
"testing"
78
)
89

910
var line string

internal/lines.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package internal
33
import (
44
"errors"
55
"fmt"
6-
"github.com/wavefronthq/wavefront-sdk-go/internal/auth"
7-
"github.com/wavefronthq/wavefront-sdk-go/internal/sdkmetrics"
86
"log"
97
"net/http"
108
"strings"
119
"sync"
1210
"sync/atomic"
1311
"time"
12+
13+
"github.com/wavefronthq/wavefront-sdk-go/internal/auth"
14+
"github.com/wavefronthq/wavefront-sdk-go/internal/sdkmetrics"
1415
)
1516

1617
const (

internal/lines_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package internal
22

33
import (
44
"fmt"
5-
"github.com/wavefronthq/wavefront-sdk-go/internal/auth"
65
"net/http"
76
"testing"
87

98
"github.com/stretchr/testify/assert"
9+
"github.com/wavefronthq/wavefront-sdk-go/internal/auth"
1010
)
1111

1212
type fakeReporter struct {

internal/metric/formatter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package metric
33
import (
44
"errors"
55
"fmt"
6-
"github.com/wavefronthq/wavefront-sdk-go/internal"
76
"strconv"
7+
8+
"github.com/wavefronthq/wavefront-sdk-go/internal"
89
)
910

1011
// Gets a metric line in the Wavefront metrics data format:

0 commit comments

Comments
 (0)