From 6c0e2d31fbe7b9c674a72800f883e0d1c8989288 Mon Sep 17 00:00:00 2001 From: johncming Date: Wed, 27 Nov 2019 17:04:43 +0800 Subject: [PATCH] etcdmain: remove duplicate codes. --- etcdmain/config.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/etcdmain/config.go b/etcdmain/config.go index 9e6f5460a..28a10bb07 100644 --- a/etcdmain/config.go +++ b/etcdmain/config.go @@ -21,15 +21,12 @@ import ( "fmt" "io/ioutil" "log" - "net/url" "os" "runtime" - "strings" "go.etcd.io/etcd/embed" "go.etcd.io/etcd/pkg/flags" "go.etcd.io/etcd/pkg/logutil" - "go.etcd.io/etcd/pkg/types" "go.etcd.io/etcd/version" "go.uber.org/zap" @@ -377,14 +374,6 @@ func (cfg *config) configFromFile(path string) error { return yerr } - if cfg.ec.ListenMetricsUrlsJSON != "" { - us, err := types.NewURLs(strings.Split(cfg.ec.ListenMetricsUrlsJSON, ",")) - if err != nil { - log.Fatalf("unexpected error setting up listen-metrics-urls: %v", err) - } - cfg.ec.ListenMetricsUrls = []url.URL(us) - } - if cfg.cp.FallbackJSON != "" { if err := cfg.cf.fallback.Set(cfg.cp.FallbackJSON); err != nil { log.Fatalf("unexpected error setting up discovery-fallback flag: %v", err)