mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Use http constants instead of string (#5908)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
//
|
||||
// result := Scrape("http://localhost:9153/metrics")
|
||||
// v := MetricValue("coredns_cache_capacity", result)
|
||||
//
|
||||
package test
|
||||
|
||||
import (
|
||||
@@ -217,7 +216,7 @@ func makeBuckets(m *dto.Metric) map[string]string {
|
||||
|
||||
func fetchMetricFamilies(url string, ch chan<- *dto.MetricFamily) {
|
||||
defer close(ch)
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user