mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
This commit is contained in:
@@ -41,7 +41,7 @@ type Converter struct {
|
||||
Debug DebugLogger
|
||||
}
|
||||
|
||||
// NewConverter makes a new Converter object.
|
||||
// NewConverter creates a new Converter object.
|
||||
func NewConverter() *Converter {
|
||||
return &Converter{
|
||||
funcs: map[typePair]reflect.Value{},
|
||||
@@ -83,7 +83,7 @@ func (c *Converter) Register(conversionFunc interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// FieldMatchingType contains a list of ways in which struct fields could be
|
||||
// FieldMatchingFlags contains a list of ways in which struct fields could be
|
||||
// copied. These constants may be | combined.
|
||||
type FieldMatchingFlags int
|
||||
|
||||
@@ -105,7 +105,7 @@ const (
|
||||
AllowDifferentFieldTypeNames
|
||||
)
|
||||
|
||||
// Returns true if the given flag or combination of flags is set.
|
||||
// IsSet returns true if the given flag or combination of flags is set.
|
||||
func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool {
|
||||
return f&flag == flag
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ func (metaInsertion) Interpret(in interface{}) (version, kind string) {
|
||||
return m.Version, m.Kind
|
||||
}
|
||||
|
||||
// DataAPIVersionAndKind will return the APIVersion and Kind of the given wire-format
|
||||
// DataVersionAndKind will return the APIVersion and Kind of the given wire-format
|
||||
// enconding of an API Object, or an error.
|
||||
func (s *Scheme) DataVersionAndKind(data []byte) (version, kind string, err error) {
|
||||
findKind := s.MetaInsertionFactory.Create("", "")
|
||||
@@ -217,8 +217,8 @@ func maybeCopy(obj interface{}) interface{} {
|
||||
return v2.Interface()
|
||||
}
|
||||
|
||||
// Ensures that obj is a pointer of some sort. Returns a reflect.Value of the
|
||||
// dereferenced pointer, ensuring that it is settable/addressable.
|
||||
// enforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value
|
||||
// of the dereferenced pointer, ensuring that it is settable/addressable.
|
||||
// Returns an error if this is not possible.
|
||||
func enforcePtr(obj interface{}) (reflect.Value, error) {
|
||||
v := reflect.ValueOf(obj)
|
||||
|
Reference in New Issue
Block a user