1
0
mirror of https://github.com/nginxinc/nginx-prometheus-exporter.git synced 2025-08-09 16:02:43 +03:00

Enable more linters (#622)

This commit is contained in:
Luca Comellini
2024-02-22 10:27:54 -08:00
committed by GitHub
parent e848697cec
commit d620391f71
9 changed files with 41 additions and 38 deletions

View File

@@ -38,7 +38,9 @@ func TestParsePositiveDuration(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
got, err := parsePositiveDuration(tt.testInput)
if (err != nil) != tt.wantErr {
t.Errorf("parsePositiveDuration() error = %v, wantErr %v", err, tt.wantErr)
@@ -91,7 +93,9 @@ func TestParseUnixSocketAddress(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
socketPath, requestPath, err := parseUnixSocketAddress(tt.testInput)
if (err != nil) != tt.wantErr {
t.Errorf("parseUnixSocketAddress() error = %v, wantErr %v", err, tt.wantErr)