Skip to content

Commit b7eec63

Browse files
committed
Fixup: indents in-comment code blocks and wordings
Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 25fb8b6 commit b7eec63

File tree

11 files changed

+18
-15
lines changed

11 files changed

+18
-15
lines changed

apis/meta/conditions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ const (
4646
// encountered an error during the reconcile process or it has made insufficient progress (timeout).
4747
// The Condition adheres to an "abnormal-true" polarity pattern, and MUST only be present on the resource if the
4848
// Condition is True.
49+
// For more information about polarity patterns, see:
50+
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
4951
StalledCondition string = "Stalled"
5052

5153
// ReconcilingCondition indicates the controller is currently working on reconciling the latest changes. This MAY be
5254
// True for multiple reconciliation attempts, e.g. when an transient error occurred.
5355
// The Condition adheres to an "abnormal-true" polarity pattern, and MUST only be present on the resource if the
5456
// Condition is True.
57+
// For more information about polarity patterns, see:
58+
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
5559
ReconcilingCondition string = "Reconciling"
5660
)
5761

runtime/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const (
4444
//
4545
// // Get a runtime Kubernetes client configuration with the options set
4646
// restConfig := client.GetConfigOrDie(clientOptions)
47-
// }
47+
// }
4848
type Options struct {
4949
// QPS indicates the maximum queries-per-second of requests sent to to the Kubernetes API, defaults to 20.
5050
QPS float32

runtime/controller/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package controller offers embeddable structs for usage in your controller and underlying reconcilers, to help with
17+
// Package controller offers embeddable structs for use in your controller and underlying reconcilers, to help with
1818
// conforming to GitOps Toolkit conventions.
1919
package controller

runtime/controller/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ type Metrics struct {
5555
// MustMakeMetrics creates a new Metrics with a new metrics.Recorder, and the Metrics.Scheme set to that of the given
5656
// mgr.
5757
// It attempts to register the metrics collectors in the controller-runtime metrics registry, which panics upon the
58-
// first registration that causes an error. Which usually happens if you try to initialize a Metrics value twice for
58+
// first registration that causes an error. Which usually happens if you try to initialise a Metrics value twice for
5959
// your controller.
6060
func MustMakeMetrics(mgr ctrl.Manager) Metrics {
6161
metricsRecorder := metrics.NewRecorder()

runtime/leaderelection/leaderelection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const (
5454
// RenewDeadline: &leaderElectionOptions.RenewDeadline,
5555
// RetryPeriod: &leaderElectionOptions.RetryPeriod,
5656
// })
57-
// }
57+
// }
5858
type Options struct {
5959
// Enable determines whether or not to use leader election when starting the manager.
6060
Enable bool

runtime/logger/logger.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ var levelStrings = map[string]zapcore.Level{
3939
"error": zapcore.ErrorLevel,
4040
}
4141

42-
// These are for convenience when doing log.V(...) to log at a
43-
// particular level. They correspond to the logr equivalents of the
44-
// zap levels above.
42+
// These are for convenience when doing log.V(...) to log at a particular level. They correspond to the logr
43+
// equivalents of the zap levels above.
4544
const (
4645
TraceLevel = 2
4746
DebugLevel = 1
@@ -72,7 +71,7 @@ var stackLevelStrings = map[string]zapcore.Level{
7271
//
7372
// // Use the values during the initialisation of the logger
7473
// ctrl.SetLogger(logger.NewLogger(logOptions))
75-
// }
74+
// }
7675
type Options struct {
7776
LogEncoding string
7877
LogLevel string

runtime/patch/patch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import (
5757
// return ctrl.Result{}, client.IgnoreNotFound(err)
5858
// }
5959
//
60-
// // Initialize the patch helper
60+
// // Initialise the patch helper
6161
// patchHelper, err := patch.NewHelper(obj, r.Client)
6262
// if err != nil {
6363
// return ctrl.Result{}, err
@@ -131,7 +131,7 @@ type Helper struct {
131131
isConditionsSetter bool
132132
}
133133

134-
// NewHelper returns an initialized Helper.
134+
// NewHelper returns an initialised Helper.
135135
func NewHelper(obj client.Object, crClient client.Client) (*Helper, error) {
136136
// Get the GroupVersionKind of the object,
137137
// used to validate against later on.

runtime/pprof/pprof.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var endpoints = map[string]http.Handler{
4343

4444
// SetupHandlers registers the pprof endpoints on the metrics server of the given mgr.
4545
//
46-
// The func can be used in the main.go file of your, after initialisation of the manager:
46+
// The func can be used in the main.go file of your controller, after initialisation of the manager:
4747
//
4848
// func main() {
4949
// mgr, err := ctrl.NewManager(cfg, ctrl.Options{})
@@ -52,7 +52,7 @@ var endpoints = map[string]http.Handler{
5252
// os.Exit(1)
5353
// }
5454
// pprof.SetupHandlers(mgr, log)
55-
// }
55+
// }
5656
func SetupHandlers(mgr ctrl.Manager, log logr.Logger) {
5757
// Only set the fraction if there is no existing setting
5858
if runtime.SetMutexProfileFraction(-1) == 0 {

runtime/predicates/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package predicates provides generic predicates for GitOps Toolkit components to filter events conform standards.
17+
// Package predicates provides generic controller-runtime predicates for GitOps Toolkit components to filter events.
1818
package predicates

runtime/probes/probes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
// SetupChecks configures simple default ready and health probes on the given mgr.
2828
//
29-
// The func can be used in the main.go file of your, after initialisation of the manager:
29+
// The func can be used in the main.go file of your controller, after initialisation of the manager:
3030
//
3131
// func main() {
3232
// mgr, err := ctrl.NewManager(cfg, ctrl.Options{})

0 commit comments

Comments
 (0)