type CoerceOptions … // Coerce checks types of embedded ObjectMeta and TypeMeta and prunes unknown fields inside the former. // It does coerce ObjectMeta and TypeMeta at the root if isResourceRoot is true. // If opts.ReturnUnknownFieldPaths is true, it will return the paths of any fields that are not a part of the // schema that are dropped when unmarshaling. // If opts.DropInvalidFields is true, fields of wrong type will be dropped. func CoerceWithOptions(pth *field.Path, obj interface{ … } // Coerce calls CoerceWithOptions without returning unknown field paths. func Coerce(pth *field.Path, obj interface{ … } type coercer … func (c *coercer) coerce(pth *field.Path, x interface{ … }