Skip to content

Commit e8ab9bc

Browse files
authored
Upgrade golangci lint to latest (#50)
Signed-off-by: Bogdan Drutu <[email protected]> Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 6415b53 commit e8ab9bc

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.golangci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ linters:
159159
- asciicheck
160160
- bodyclose
161161
- cyclop
162-
- deadcode
163162
- depguard
164163
- durationcheck
165164
- errorlint
@@ -192,7 +191,6 @@ linters:
192191
- predeclared
193192
- revive
194193
- staticcheck
195-
- structcheck
196194
- stylecheck
197195
- testpackage
198196
- thelper

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SHELL = /bin/bash
22
BASE = $(CURDIR)
33
CP_RF = cp -rf
4-
GOLANGCI_LINT_VERSION = 1.20.0
4+
GOLANGCI_LINT_VERSION = 1.49.0
55

66
# enable module support across all go commands.
77
export GO111MODULE = on

protocol/collectd/format/format.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package collectdformat
22

33
// JSONWriteBody is the full POST body of collectd's write_http format
4+
//
45
//easyjson:json
56
type JSONWriteBody []*JSONWriteFormat
67

78
// JSONWriteFormat is the format for collectd json datapoints
9+
//
810
//easyjson:json
911
type JSONWriteFormat struct {
1012
Dsnames []*string `json:"dsnames"`

protocol/signalfx/format/signalfx_format.go

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
)
88

99
// JSONDatapointV1 is the JSON API format for /v1/datapoint
10+
//
1011
//easyjson:json
1112
type JSONDatapointV1 struct {
1213
//easyjson:json
@@ -16,10 +17,12 @@ type JSONDatapointV1 struct {
1617
}
1718

1819
// JSONDatapointV2 is the V2 json datapoint sending format
20+
//
1921
//easyjson:json
2022
type JSONDatapointV2 map[string][]*BodySendFormatV2
2123

2224
// BodySendFormatV2 is the JSON format signalfx datapoints are expected to be in
25+
//
2326
//easyjson:json
2427
type BodySendFormatV2 struct {
2528
Metric string `json:"metric"`
@@ -36,10 +39,12 @@ func (bodySendFormat *BodySendFormatV2) String() string {
3639
type ValueToSend interface{}
3740

3841
// JSONEventV2 is the V2 json event sending format
42+
//
3943
//easyjson:json
4044
type JSONEventV2 []*EventSendFormatV2
4145

4246
// EventSendFormatV2 is the JSON format signalfx datapoints are expected to be in
47+
//
4348
//easyjson:json
4449
type EventSendFormatV2 struct {
4550
EventType string `json:"eventType"`
@@ -51,6 +56,7 @@ type EventSendFormatV2 struct {
5156

5257
// InputAnnotation associates an event that explains latency with a timestamp.
5358
// Unlike log statements, annotations are often codes. Ex. “ws” for WireSend
59+
//
5460
//easyjson:json
5561
type InputAnnotation struct {
5662
Endpoint *trace.Endpoint `json:"endpoint"`
@@ -78,6 +84,7 @@ func GetPointerToInt64(p *float64) *int64 {
7884
}
7985

8086
// BinaryAnnotation associates an event that explains latency with a timestamp.
87+
//
8188
//easyjson:json
8289
type BinaryAnnotation struct {
8390
Endpoint *trace.Endpoint `json:"endpoint"`
@@ -86,6 +93,7 @@ type BinaryAnnotation struct {
8693
}
8794

8895
// InputSpan defines a span that is the union of v1 and v2 spans
96+
//
8997
//easyjson:json
9098
type InputSpan struct {
9199
trace.Span
@@ -96,5 +104,6 @@ type InputSpan struct {
96104
}
97105

98106
// InputSpanList is an array of InputSpan pointers
107+
//
99108
//easyjson:json
100109
type InputSpanList []*InputSpan

protocol/wavefront/wavefrontlistener.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func getMetricPieces(line string) []string {
153153
}
154154

155155
// https://docs.wavefront.com/wavefront_data_format.html
156-
//<metricName> <metricValue> [<timestamp>] source=<source> [pointTags]
156+
// <metricName> <metricValue> [<timestamp>] source=<source> [pointTags]
157157
func (listener *Listener) fromWavefrontDatapoint(line string) *datapoint.Datapoint {
158158
pieces := getMetricPieces(line)
159159
if len(pieces) < 3 {

0 commit comments

Comments
 (0)