Migrate ParseAddress to shared-secure-libs (#1313)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-06-15 13:35:29 -04:00
1 parent 8c63ede9cc
commit 9c945b7021
6 files changed
+24 -56

No files matched your search

+4 -4
View File
@@ -535,8 +535,8 @@ func (b *Server) SetupControllerPublicClusterAddress(conf *config.Config, flagVa
}
} else {
var err error
conf.Controller.PublicClusterAddr, err = config.ParseAddress(conf.Controller.PublicClusterAddr)
if err != nil && err != config.ErrNotAUrl {
conf.Controller.PublicClusterAddr, err = configutil.ParsePath(conf.Controller.PublicClusterAddr)
if err != nil && !errors.Is(err, configutil.ErrNotAUrl) {
return fmt.Errorf("Error parsing public cluster addr: %w", err)
}
}
@@ -572,8 +572,8 @@ func (b *Server) SetupWorkerPublicAddress(conf *config.Config, flagValue string)
}
} else {
var err error
conf.Worker.PublicAddr, err = config.ParseAddress(conf.Worker.PublicAddr)
if err != nil && err != config.ErrNotAUrl {
conf.Worker.PublicAddr, err = configutil.ParsePath(conf.Worker.PublicAddr)
if err != nil && !errors.Is(err, configutil.ErrNotAUrl) {
return fmt.Errorf("Error parsing public addr: %w", err)
}
}