Unify Godoc formatting, fix various typos

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
This commit is contained in:
Vojtech Vitek (V-Teq)
2014-09-02 12:00:28 +02:00
parent 7b44f88c2b
commit 59f58cd043
58 changed files with 241 additions and 243 deletions

View File

@@ -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
}

View File

@@ -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)