Skip to content

Commit 88df5ea

Browse files
Merge pull request #132600 from nojnhuh/cel-godoc
Fix CEL library doc string whitespace Kubernetes-commit: 3955220f84b5c85d718f89856385157f976f0fe1
2 parents 6093bba + 2898ecd commit 88df5ea

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ require (
4848
gopkg.in/evanphx/json-patch.v4 v4.13.0
4949
gopkg.in/go-jose/go-jose.v2 v2.6.3
5050
gopkg.in/natefinch/lumberjack.v2 v2.2.1
51-
k8s.io/api v0.0.0-20251010205700-ea7b3fb357a0
52-
k8s.io/apimachinery v0.0.0-20251008212151-ff7ddf5d4ebc
53-
k8s.io/client-go v0.0.0-20251009132834-8de342516c3d
51+
k8s.io/api v0.0.0-20251014034829-180fdecad17a
52+
k8s.io/apimachinery v0.0.0-20251013232933-de3ea85ba46a
53+
k8s.io/client-go v0.0.0-20251014161020-f217e7096a24
5454
k8s.io/component-base v0.0.0-20251013235701-797fe69345a1
5555
k8s.io/klog/v2 v2.130.1
5656
k8s.io/kms v0.0.0-20250918004306-2fba1b2102ee

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs
295295
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
296296
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
297297
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
298-
k8s.io/api v0.0.0-20251010205700-ea7b3fb357a0 h1:mowQTrouYk9kgzE8McZGwb6HldJnWbuIXetfVpM4YXw=
299-
k8s.io/api v0.0.0-20251010205700-ea7b3fb357a0/go.mod h1:2QWI4G7Z29PJMgZodjE0JE4CUpVhg3xyP/aAiHciRh8=
300-
k8s.io/apimachinery v0.0.0-20251008212151-ff7ddf5d4ebc h1:QUNPCNgaM5vq8hPZ3ia8pbKf8pLBz+3s2Oevtgwlp5o=
301-
k8s.io/apimachinery v0.0.0-20251008212151-ff7ddf5d4ebc/go.mod h1:wE5nOmI8k5gdg4Nuo6Csst6CE+WgeB7ZNhh7K5lLUbs=
302-
k8s.io/client-go v0.0.0-20251009132834-8de342516c3d h1:x7jXWr86q+EnQ3v0YbeYruzdlp2H+ikk7YWHntmCRo0=
303-
k8s.io/client-go v0.0.0-20251009132834-8de342516c3d/go.mod h1:pLkZ7LrYUnwinCWMPsi3ZrzXKrE12rO0DcpZoagNOlE=
298+
k8s.io/api v0.0.0-20251014034829-180fdecad17a h1:xQZUr3sFO3VRP4paNCKSwDBL//XW7MfgEIc6F16S7tc=
299+
k8s.io/api v0.0.0-20251014034829-180fdecad17a/go.mod h1:G9i/7w0plhqKf252B96rN9Ng5YQFUYQcEjRg17gOBdc=
300+
k8s.io/apimachinery v0.0.0-20251013232933-de3ea85ba46a h1:6rysSFhh7j8BX8v+cqAFLo+62x5NMeJHZ5OiFZZYcDE=
301+
k8s.io/apimachinery v0.0.0-20251013232933-de3ea85ba46a/go.mod h1:wE5nOmI8k5gdg4Nuo6Csst6CE+WgeB7ZNhh7K5lLUbs=
302+
k8s.io/client-go v0.0.0-20251014161020-f217e7096a24 h1:LrafqFq+m3sWOdhKr/AEeqheFBQQ0MuijwB1wFqUvL4=
303+
k8s.io/client-go v0.0.0-20251014161020-f217e7096a24/go.mod h1:ElSBLfoVn3u2sVUj0wgPFCK3PnzrTxhI33Nxo7yk3kU=
304304
k8s.io/component-base v0.0.0-20251013235701-797fe69345a1 h1:pSpfXc3EjbFNP4YkG9YZVLFQlcdmtZxxzGsVOgioRwc=
305305
k8s.io/component-base v0.0.0-20251013235701-797fe69345a1/go.mod h1:YhBmNzDBbTUmP/jhWfk0Hm2uLYW/07Q6qSyN45Prf8w=
306306
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=

pkg/cel/library/quantity.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import (
7070
//
7171
// - asInteger: returns a representation of the current value as an int64 if
7272
// possible or results in an error if conversion would result in overflow
73-
// or loss of precision.
73+
// or loss of precision.
7474
//
7575
// - asApproximateFloat: returns a float64 representation of the quantity which may
7676
// lose precision. If the value of the quantity is outside the range of a float64
@@ -119,7 +119,6 @@ import (
119119
//
120120
// - compareTo: Compares receiver to operand and returns 0 if they are equal, 1 if the receiver is greater, or -1 if the receiver is less than the operand
121121
//
122-
//
123122
// <Quantity>.isLessThan(<quantity>) <bool>
124123
// <Quantity>.isGreaterThan(<quantity>) <bool>
125124
// <Quantity>.compareTo(<quantity>) <int>
@@ -133,7 +132,6 @@ import (
133132
// quantity("50Mi").isGreaterThan(quantity("100Mi")) // returns false
134133
// quantity("50M").isLessThan(quantity("100M")) // returns true
135134
// quantity("100M").isLessThan(quantity("50M")) // returns false
136-
137135
func Quantity() cel.EnvOption {
138136
return cel.Lib(quantityLib)
139137
}

pkg/cel/library/semverlib.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
// to semver.org documentation for information on accepted patterns.
3838
// An optional "normalize" argument can be passed to enable normalization. Normalization removes any "v" prefix, adds a
3939
// 0 minor and patch numbers to versions with only major or major.minor components specified, and removes any leading 0s.
40+
//
4041
// semver(<string>) <Semver>
4142
// semver(<string>, <bool>) <Semver>
4243
//
@@ -65,7 +66,7 @@ import (
6566
//
6667
// isSemver('1.0.0') // returns true
6768
// isSemver('hello') // returns false
68-
// isSemver('v1.0') // returns false (leading "v" is not allowed unless normalization is enabled)
69+
//isSemver('v1.0') // returns false (leading "v" is not allowed unless normalization is enabled)
6970
// isSemver('v1.0', true) // Applies normalization to remove leading "v". returns true
7071
// semver('1.0', true) // Applies normalization to add the missing patch version. Returns true
7172
// semver('01.01.01', true) // Applies normalization to remove leading zeros. Returns true
@@ -88,7 +89,6 @@ import (
8889
//
8990
// - compareTo: Compares receiver to operand and returns 0 if they are equal, 1 if the receiver is greater, or -1 if the receiver is less than the operand
9091
//
91-
//
9292
// <Semver>.isLessThan(<semver>) <bool>
9393
// <Semver>.isGreaterThan(<semver>) <bool>
9494
// <Semver>.compareTo(<semver>) <int>
@@ -98,7 +98,6 @@ import (
9898
// semver("1.2.3").compareTo(semver("1.2.3")) // returns 0
9999
// semver("1.2.3").compareTo(semver("2.0.0")) // returns -1
100100
// semver("1.2.3").compareTo(semver("0.1.2")) // returns 1
101-
102101
func SemverLib(options ...SemverOption) cel.EnvOption {
103102
semverLib := &semverLibType{}
104103
for _, o := range options {

0 commit comments

Comments
 (0)