From 022075d8beab90fe0a2f260c10a1d8656970e818 Mon Sep 17 00:00:00 2001 From: allencloud Date: Thu, 22 Dec 2016 11:45:16 +0800 Subject: [PATCH] fix nits in func comments Signed-off-by: allencloud --- ca/certificates.go | 2 +- log/context.go | 2 +- manager/allocator/networkallocator/portallocator.go | 2 +- manager/manager.go | 2 +- manager/orchestrator/replicated/services.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ca/certificates.go b/ca/certificates.go index 6eb6e4dd74..b95f6fb748 100644 --- a/ca/certificates.go +++ b/ca/certificates.go @@ -69,7 +69,7 @@ const ( MinNodeCertExpiration = 1 * time.Hour ) -// A recoverableErr is an non-fatal error encountered signing a certificate, +// A recoverableErr is a non-fatal error encountered signing a certificate, // which means that the certificate issuance may be retried at a later time. type recoverableErr struct { err error diff --git a/log/context.go b/log/context.go index 4539e47eb9..3da380f112 100644 --- a/log/context.go +++ b/log/context.go @@ -42,7 +42,7 @@ func GetLogger(ctx context.Context) *logrus.Entry { } // WithModule adds the module to the context, appending it with a slash if a -// module already exists. A module is just an roughly correlated defined by the +// module already exists. A module is just a roughly correlated defined by the // call tree for a given context. // // As an example, we might have a "node" module already part of a context. If diff --git a/manager/allocator/networkallocator/portallocator.go b/manager/allocator/networkallocator/portallocator.go index a7391eba6c..1275b08b07 100644 --- a/manager/allocator/networkallocator/portallocator.go +++ b/manager/allocator/networkallocator/portallocator.go @@ -73,7 +73,7 @@ func newPortSpace(protocol api.PortConfig_Protocol) (*portSpace, error) { }, nil } -// getPortConfigkey returns a map key for doing set operations with +// getPortConfigKey returns a map key for doing set operations with // ports. The key consists of name, protocol and target port which // uniquely identifies a port within a single Endpoint. func getPortConfigKey(p *api.PortConfig) api.PortConfig { diff --git a/manager/manager.go b/manager/manager.go index 649f229532..c81bfbafea 100644 --- a/manager/manager.go +++ b/manager/manager.go @@ -45,7 +45,7 @@ const ( defaultTaskHistoryRetentionLimit = 5 ) -// RemoteAddrs provides an listening address and an optional advertise address +// RemoteAddrs provides a listening address and an optional advertise address // for serving the remote API. type RemoteAddrs struct { // Address to bind diff --git a/manager/orchestrator/replicated/services.go b/manager/orchestrator/replicated/services.go index 2084ba160d..eee840c814 100644 --- a/manager/orchestrator/replicated/services.go +++ b/manager/orchestrator/replicated/services.go @@ -181,7 +181,7 @@ func (r *Orchestrator) reconcile(ctx context.Context, service *api.Service) { func (r *Orchestrator) addTasks(ctx context.Context, batch *store.Batch, service *api.Service, runningSlots map[uint64]orchestrator.Slot, deadSlots map[uint64]orchestrator.Slot, count int) { slot := uint64(0) for i := 0; i < count; i++ { - // Find an slot number that is missing a running task + // Find a slot number that is missing a running task for { slot++ if _, ok := runningSlots[slot]; !ok {