mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Merge pull request #93809 from Howie66/chore-Correct-words
Chore correct words
This commit is contained in:
commit
33a7ea7ca1
@ -145,7 +145,7 @@ func (c *Expiring) gc(now time.Time) {
|
|||||||
// expired.
|
// expired.
|
||||||
//
|
//
|
||||||
// heap[0] is a peek at the next element in the heap, which is not obvious
|
// heap[0] is a peek at the next element in the heap, which is not obvious
|
||||||
// from looking at the (*expiringHeap).Pop() implmentation below.
|
// from looking at the (*expiringHeap).Pop() implementation below.
|
||||||
// heap.Pop() swaps the first entry with the last entry of the heap, then
|
// heap.Pop() swaps the first entry with the last entry of the heap, then
|
||||||
// calls (*expiringHeap).Pop() which returns the last element.
|
// calls (*expiringHeap).Pop() which returns the last element.
|
||||||
if len(c.heap) == 0 || now.Before(c.heap[0].expiry) {
|
if len(c.heap) == 0 || now.Before(c.heap[0].expiry) {
|
||||||
|
@ -163,7 +163,7 @@ func matchesError(err error, fns ...Matcher) bool {
|
|||||||
|
|
||||||
// filterErrors returns any errors (or nested errors, if the list contains
|
// filterErrors returns any errors (or nested errors, if the list contains
|
||||||
// nested Errors) for which all fns return false. If no errors
|
// nested Errors) for which all fns return false. If no errors
|
||||||
// remain a nil list is returned. The resulting silec will have all
|
// remain a nil list is returned. The resulting slice will have all
|
||||||
// nested slices flattened as a side effect.
|
// nested slices flattened as a side effect.
|
||||||
func filterErrors(list []error, fns ...Matcher) []error {
|
func filterErrors(list []error, fns ...Matcher) []error {
|
||||||
result := []error{}
|
result := []error{}
|
||||||
|
@ -130,7 +130,7 @@ func (*PortRange) Type() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ParsePortRange parses a string of the form "min-max", inclusive at both
|
// ParsePortRange parses a string of the form "min-max", inclusive at both
|
||||||
// ends, and initializs a new PortRange from it.
|
// ends, and initializes a new PortRange from it.
|
||||||
func ParsePortRange(value string) (*PortRange, error) {
|
func ParsePortRange(value string) (*PortRange, error) {
|
||||||
pr := &PortRange{}
|
pr := &PortRange{}
|
||||||
err := pr.Set(value)
|
err := pr.Set(value)
|
||||||
|
@ -35,7 +35,7 @@ func TestIPNetEqual(t *testing.T) {
|
|||||||
ipnet2 *net.IPNet
|
ipnet2 *net.IPNet
|
||||||
expect bool
|
expect bool
|
||||||
}{
|
}{
|
||||||
//null case
|
// null case
|
||||||
{
|
{
|
||||||
getIPNet("10.0.0.1/24"),
|
getIPNet("10.0.0.1/24"),
|
||||||
getIPNet(""),
|
getIPNet(""),
|
||||||
|
@ -79,7 +79,7 @@ func logPanic(r interface{}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrorHandlers is a list of functions which will be invoked when an unreturnable
|
// ErrorHandlers is a list of functions which will be invoked when a nonreturnable
|
||||||
// error occurs.
|
// error occurs.
|
||||||
// TODO(lavalamp): for testability, this and the below HandleError function
|
// TODO(lavalamp): for testability, this and the below HandleError function
|
||||||
// should be packaged up into a testable and reusable object.
|
// should be packaged up into a testable and reusable object.
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version is an opqaue representation of a version number
|
// Version is an opaque representation of a version number
|
||||||
type Version struct {
|
type Version struct {
|
||||||
components []uint
|
components []uint
|
||||||
semver bool
|
semver bool
|
||||||
|
@ -276,7 +276,7 @@ func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProxyWatcher lets you wrap your channel in watch Interface. Threadsafe.
|
// ProxyWatcher lets you wrap your channel in watch Interface. threadsafe.
|
||||||
type ProxyWatcher struct {
|
type ProxyWatcher struct {
|
||||||
result chan Event
|
result chan Event
|
||||||
stopCh chan struct{}
|
stopCh chan struct{}
|
||||||
|
@ -203,7 +203,7 @@ type TLSClientConfig struct {
|
|||||||
// Server should be accessed without verifying the TLS certificate. For testing only.
|
// Server should be accessed without verifying the TLS certificate. For testing only.
|
||||||
Insecure bool
|
Insecure bool
|
||||||
// ServerName is passed to the server for SNI and is used in the client to check server
|
// ServerName is passed to the server for SNI and is used in the client to check server
|
||||||
// ceritificates against. If ServerName is empty, the hostname used to contact the
|
// certificates against. If ServerName is empty, the hostname used to contact the
|
||||||
// server is used.
|
// server is used.
|
||||||
ServerName string
|
ServerName string
|
||||||
|
|
||||||
|
@ -638,7 +638,7 @@ func (b *throttledLogger) attemptToLog() (klog.Level, bool) {
|
|||||||
return -1, false
|
return -1, false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Infof will write a log message at each logLevel specified by the reciever's throttleSettings
|
// Infof will write a log message at each logLevel specified by the receiver's throttleSettings
|
||||||
// as long as it hasn't written a log message more recently than minLogInterval.
|
// as long as it hasn't written a log message more recently than minLogInterval.
|
||||||
func (b *throttledLogger) Infof(message string, args ...interface{}) {
|
func (b *throttledLogger) Infof(message string, args ...interface{}) {
|
||||||
if logLevel, ok := b.attemptToLog(); ok {
|
if logLevel, ok := b.attemptToLog(); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user