code: func maintainAssets(stopChan chan struct{}) {
  	renewalTicker := time.NewTicker(RenewInterval)
  	ocspTicker := time.NewTicker(OCSPInterval)
  
  	for {
  		select {
  		case <-renewalTicker.C:
  			log.Println("[INFO] Scanning for expiring certificates")
  			RenewManagedCertificates(false)
  			log.Println("[INFO] Done checking certificates")
  		case <-ocspTicker.C:
  			log.Println("[INFO] Scanning for stale OCSP staples")
  			UpdateOCSPStaples()
  			DeleteOldStapleFiles()
  			log.Println("[INFO] Done checking OCSP staples")
  		case <-stopChan:
  			renewalTicker.Stop()
  			ocspTicker.Stop()
  			log.Println("[INFO] Stopped background maintenance routine")
  			return
  		}
  	}
  }
docs: // maintainAssets is a permanently-blocking function
  // that loops indefinitely and, on a regular schedule, checks
  // certificates for expiration and initiates a renewal of certs
  // that are expiring soon. It also updates OCSP stapling and
  // performs other maintenance of assets. It should only be
  // called once per process.
  //
  // You must pass in the channel which you'll close when
  // maintenance should stop, to allow this goroutine to clean up
  // after itself and unblock. (Not that you HAVE to stop it...)