File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
18
18
"net/url"
19
19
"os"
20
20
"regexp"
21
+ "slices"
21
22
"strings"
22
23
23
24
"github.com/prometheus/client_golang/prometheus"
@@ -64,11 +65,11 @@ func (e *Exporter) discoverDatabaseDSNs() []string {
64
65
continue
65
66
}
66
67
for _ , databaseName := range databaseNames {
67
- if contains (e .excludeDatabases , databaseName ) {
68
+ if slices . Contains (e .excludeDatabases , databaseName ) {
68
69
continue
69
70
}
70
71
71
- if len (e .includeDatabases ) != 0 && ! contains (e .includeDatabases , databaseName ) {
72
+ if len (e .includeDatabases ) != 0 && ! slices . Contains (e .includeDatabases , databaseName ) {
72
73
continue
73
74
}
74
75
Original file line number Diff line number Diff line change @@ -24,15 +24,6 @@ import (
24
24
"github.com/lib/pq"
25
25
)
26
26
27
- func contains (a []string , x string ) bool {
28
- for _ , n := range a {
29
- if x == n {
30
- return true
31
- }
32
- }
33
- return false
34
- }
35
-
36
27
// convert a string to the corresponding ColumnUsage
37
28
func stringToColumnUsage (s string ) (ColumnUsage , error ) {
38
29
var u ColumnUsage
You can’t perform that action at this time.
0 commit comments