mirror of
https://github.com/prometheus-community/windows_exporter
synced 2024-12-27 17:02:04 +00:00
chore(ci): update golangci-lint to latest version
Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
parent
99b6d215a2
commit
c713bed4e3
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@ -98,9 +98,9 @@ jobs:
|
||||
go-version-file: 'go.mod'
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.55.2
|
||||
version: v1.58
|
||||
args: "--timeout=5m"
|
||||
|
||||
# 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.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")
|
||||
_, err := fmt.Fprintln(w, `{"status":"ok"}`)
|
||||
if err != nil {
|
||||
_ = 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
|
||||
// can be serialized.
|
||||
err := json.NewEncoder(w).Encode(prometheusVersion{
|
||||
|
@ -12,13 +12,13 @@ type fakeWmiClass struct {
|
||||
}
|
||||
|
||||
var (
|
||||
mapQueryAll = func(src interface{}, class string, where string) string {
|
||||
mapQueryAll = func(src interface{}, _ string, _ string) string {
|
||||
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())
|
||||
}
|
||||
mapQueryAllForClass = func(src interface{}, class string, where string) string {
|
||||
mapQueryAllForClass = func(src interface{}, class string, _ string) string {
|
||||
return QueryAllForClass(src, class, log.NewNopLogger())
|
||||
}
|
||||
mapQueryAllForClassWhere = func(src interface{}, class string, where string) string {
|
||||
|
Loading…
Reference in New Issue
Block a user