mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-23 13:16:36 +00:00
chore(ci): update golangci-lint to latest version
Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -98,9 +98,9 @@ jobs:
|
|||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: v1.55.2
|
version: v1.58
|
||||||
args: "--timeout=5m"
|
args: "--timeout=5m"
|
||||||
|
|
||||||
# golangci-lint action doesn't always provide helpful output, so re-run without the action for
|
# golangci-lint action doesn't always provide helpful output, so re-run without the action for
|
||||||
|
|||||||
@@ -180,14 +180,14 @@ func main() {
|
|||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.HandleFunc(*metricsPath, withConcurrencyLimit(*maxRequests, collectors.BuildServeHTTP(*disableExporterMetrics, *timeoutMargin)))
|
mux.HandleFunc(*metricsPath, withConcurrencyLimit(*maxRequests, collectors.BuildServeHTTP(*disableExporterMetrics, *timeoutMargin)))
|
||||||
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/health", func(w http.ResponseWriter, _ *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
_, err := fmt.Fprintln(w, `{"status":"ok"}`)
|
_, err := fmt.Fprintln(w, `{"status":"ok"}`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = level.Debug(logger).Log("msg", "Failed to write to stream", "err", err)
|
_ = level.Debug(logger).Log("msg", "Failed to write to stream", "err", err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/version", func(w http.ResponseWriter, _ *http.Request) {
|
||||||
// we can't use "version" directly as it is a package, and not an object that
|
// we can't use "version" directly as it is a package, and not an object that
|
||||||
// can be serialized.
|
// can be serialized.
|
||||||
err := json.NewEncoder(w).Encode(prometheusVersion{
|
err := json.NewEncoder(w).Encode(prometheusVersion{
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ type fakeWmiClass struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
mapQueryAll = func(src interface{}, class string, where string) string {
|
mapQueryAll = func(src interface{}, _ string, _ string) string {
|
||||||
return QueryAll(src, log.NewNopLogger())
|
return QueryAll(src, log.NewNopLogger())
|
||||||
}
|
}
|
||||||
mapQueryAllWhere = func(src interface{}, class string, where string) string {
|
mapQueryAllWhere = func(src interface{}, _ string, where string) string {
|
||||||
return QueryAllWhere(src, where, log.NewNopLogger())
|
return QueryAllWhere(src, where, log.NewNopLogger())
|
||||||
}
|
}
|
||||||
mapQueryAllForClass = func(src interface{}, class string, where string) string {
|
mapQueryAllForClass = func(src interface{}, class string, _ string) string {
|
||||||
return QueryAllForClass(src, class, log.NewNopLogger())
|
return QueryAllForClass(src, class, log.NewNopLogger())
|
||||||
}
|
}
|
||||||
mapQueryAllForClassWhere = func(src interface{}, class string, where string) string {
|
mapQueryAllForClassWhere = func(src interface{}, class string, where string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user