From 5c518d804424dfb5190cff8b42a87a3fe6ad96ed Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 25 Jan 2022 16:14:20 +0800 Subject: [PATCH] fix typo --- pkg/object/autocertmanager/autocertmanager.go | 2 +- pkg/object/meshcontroller/master/master.go | 8 ++++---- pkg/option/option.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/object/autocertmanager/autocertmanager.go b/pkg/object/autocertmanager/autocertmanager.go index 6cb820e446..1004b3bd32 100644 --- a/pkg/object/autocertmanager/autocertmanager.go +++ b/pkg/object/autocertmanager/autocertmanager.go @@ -286,7 +286,7 @@ func (acm *AutoCertManager) renew() bool { if err := d.renewCert(acm); err == nil { logger.Infof("certificate for domain %s has been renewed", d.Name) } else { - logger.Errorf("failed to renew cerficate for domain %s: %v", d.Name, err) + logger.Errorf("failed to renew certificate for domain %s: %v", d.Name, err) allSucc = false } } diff --git a/pkg/object/meshcontroller/master/master.go b/pkg/object/meshcontroller/master/master.go index 3be39c3077..d15e10f3ca 100644 --- a/pkg/object/meshcontroller/master/master.go +++ b/pkg/object/meshcontroller/master/master.go @@ -44,7 +44,7 @@ type ( superSpec *supervisor.Spec spec *spec.Admin heartbeatInterval time.Duration - certMananger *certmanager.CertManager + certManager *certmanager.CertManager registrySyncer *registrySyncer store storage.Storage @@ -102,7 +102,7 @@ func (m *Master) initMTLS() error { return err } - m.certMananger = certmanager.NewCertManager(m.superSpec, m.service, m.spec.Security.CertProvider, appCertTTL, rootCertTTL, m.store) + m.certManager = certmanager.NewCertManager(m.superSpec, m.service, m.spec.Security.CertProvider, appCertTTL, rootCertTTL, m.store) return nil } @@ -124,7 +124,7 @@ func (m *Master) run() { } } -// only handle master routines when its the cluster leader. +// only handle master routines when it's the cluster leader. func (m *Master) needHandle() bool { return m.superSpec.Super().Cluster().IsLeader() } @@ -242,7 +242,7 @@ func (m *Master) updateInstanceStatus(_spec *spec.ServiceInstanceSpec, status st // Close closes the master func (m *Master) Close() { if m.spec.EnablemTLS() { - m.certMananger.Close() + m.certManager.Close() } close(m.done) } diff --git a/pkg/option/option.go b/pkg/option/option.go index 7a8ef5c4ff..c90efcafb1 100644 --- a/pkg/option/option.go +++ b/pkg/option/option.go @@ -180,7 +180,7 @@ func (opt *Options) UseInitialCluster() bool { func (opt *Options) renameLegacyClusterRoles() { warning := "Cluster roles writer/reader are deprecated. \n" + "Renamed cluster role '%s' to '%s'. Please use primary/secondary instead. \n" - fmtLogger := fmt.Printf // Importing logger here is a import cycle, so use fmt instead. + fmtLogger := fmt.Printf // Importing logger here is an import cycle, so use fmt instead. if opt.ClusterRole == "writer" { opt.ClusterRole = "primary" fmtLogger(warning, "writer", "primary")