Skip to content

Commit 072a78c

Browse files
authored
Merge pull request #61 from inteon/minor_improvements
Remove unnecessary go expressions
2 parents 5aa829e + 9c7dad7 commit 072a78c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

manager/manager.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ func NewManager(opts Options) (*Manager, error) {
188188
return
189189
}
190190

191-
if _, ok := requestToPrivateKeyMap[req.UID]; ok {
192-
delete(requestToPrivateKeyMap, req.UID)
193-
}
191+
delete(requestToPrivateKeyMap, req.UID)
194192
},
195193
})
196194

@@ -564,7 +562,6 @@ func (m *Manager) handleRequest(ctx context.Context, volumeID string, meta metad
564562
switch readyCondition.Reason {
565563
case cmapi.CertificateRequestReasonIssued:
566564
log.V(4).Info("CertificateRequest has been issued!")
567-
break
568565
case cmapi.CertificateRequestReasonFailed:
569566
return false, fmt.Errorf("request %q has failed: %s", updatedReq.Name, readyCondition.Message)
570567
case cmapi.CertificateRequestReasonPending:
@@ -802,10 +799,8 @@ func (m *Manager) startRenewalRoutine(volumeID string) (started bool) {
802799
// Create a context that will be cancelled when the stopCh is closed
803800
ctx, cancel := context.WithCancel(context.Background())
804801
go func() {
805-
select {
806-
case <-stopCh:
807-
cancel()
808-
}
802+
<-stopCh
803+
cancel()
809804
}()
810805

811806
go func() {

0 commit comments

Comments
 (0)