Fix indentation/spacing in comments to render correctly in godoc

This commit is contained in:
Jordan Liggitt
2022-12-17 17:31:05 -05:00
parent 2ca74f2885
commit 78cb3862f1
59 changed files with 163 additions and 216 deletions

View File

@@ -28,6 +28,7 @@ import (
"time"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@@ -387,8 +388,7 @@ func (c ControllerContext) IsControllerEnabled(name string) bool {
type InitFunc func(ctx context.Context, controllerCtx ControllerContext) (controller controller.Interface, enabled bool, err error)
// ControllerInitializersFunc is used to create a collection of initializers
//
// given the loopMode.
// given the loopMode.
type ControllerInitializersFunc func(loopMode ControllerLoopMode) (initializers map[string]InitFunc)
var _ ControllerInitializersFunc = NewControllerInitializers
@@ -746,8 +746,7 @@ func leaderElectAndRun(c *config.CompletedConfig, lockIdentity string, electionC
}
// createInitializersFunc creates a initializersFunc that returns all initializer
//
// with expected as the result after filtering through filterFunc.
// with expected as the result after filtering through filterFunc.
func createInitializersFunc(filterFunc leadermigration.FilterFunc, expected leadermigration.FilterResult) ControllerInitializersFunc {
return func(loopMode ControllerLoopMode) map[string]InitFunc {
initializers := make(map[string]InitFunc)

View File

@@ -58,9 +58,8 @@ type Logger interface {
// and location of the tmpdir are returned.
//
// Note: we return a tear-down func instead of a stop channel because the later will leak temporary
//
// files that because Golang testing's call to os.Exit will not give a stop channel go routine
// enough time to remove temporary files.
// files that because Golang testing's call to os.Exit will not give a stop channel go routine
// enough time to remove temporary files.
func StartTestServer(t Logger, customFlags []string) (result TestServer, err error) {
stopCh := make(chan struct{})
var errCh chan error