diff --git a/assets/go-licenses.json b/assets/go-licenses.json index b73585330a..d961444239 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -449,11 +449,6 @@ "path": "github.com/felixge/fgprof/LICENSE.txt", "licenseText": "The MIT License (MIT)\nCopyright © 2020 Felix Geisendörfer \u003cfelix@felixge.de\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n" }, - { - "name": "github.com/felixge/httpsnoop", - "path": "github.com/felixge/httpsnoop/LICENSE.txt", - "licenseText": "Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com)\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n" - }, { "name": "github.com/fsnotify/fsnotify", "path": "github.com/fsnotify/fsnotify/LICENSE", diff --git a/go.mod b/go.mod index 10841e1aea..fc37bd05fb 100644 --- a/go.mod +++ b/go.mod @@ -98,7 +98,6 @@ require ( github.com/pkg/errors v0.9.1 github.com/pquerna/otp v1.4.0 github.com/prometheus/client_golang v1.22.0 - github.com/prometheus/common v0.63.0 github.com/quasoft/websspi v1.1.2 github.com/redis/go-redis/v9 v9.7.3 github.com/robfig/cron/v3 v3.0.1 @@ -244,6 +243,7 @@ require ( github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/rhysd/actionlint v1.7.7 // indirect github.com/rivo/uniseg v0.4.7 // indirect diff --git a/modules/git/command.go b/modules/git/command.go index f9bd1551c1..a998a2b14a 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -32,7 +32,7 @@ import ( // In most cases, it shouldn't be used. Use AddXxx function instead type TrustedCmdArgs []internal.CmdArg -const gitOperation = "command" +// const gitOperation = "command" var ( // globalCommandArgs global command args for external package setting diff --git a/routers/common/middleware_test.go b/routers/common/middleware_test.go index b2ec73c565..f455a57ad6 100644 --- a/routers/common/middleware_test.go +++ b/routers/common/middleware_test.go @@ -23,7 +23,7 @@ func TestMetricsMiddlewere(t *testing.T) { testServer := httptest.NewServer(r) // Check all defined metrics verify := func(i int) { - assert.Equal(t, testutil.CollectAndCount(reqDurationHistogram, "http_server_request_duration"), i) + assert.Equal(t, testutil.CollectAndCount(reqDurationHistogram, "http_server_request_duration_seconds"), i) assert.Equal(t, testutil.CollectAndCount(reqSizeHistogram, "http_server_request_body_size"), i) assert.Equal(t, testutil.CollectAndCount(respSizeHistogram, "http_server_response_body_size"), i) assert.Equal(t, testutil.CollectAndCount(reqInflightGauge, "http_server_active_requests"), i)