Add unconvert linter
This linter checks for unnecessary type convertions. Some convertions are whitelisted because their type is different on 32bit platforms Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
@@ -73,9 +73,9 @@ func adaptPlugin(o interface{}) filters.Adaptor {
|
||||
|
||||
switch fieldpath[0] {
|
||||
case "type":
|
||||
return string(obj.Type), len(obj.Type) > 0
|
||||
return obj.Type, len(obj.Type) > 0
|
||||
case "id":
|
||||
return string(obj.ID), len(obj.ID) > 0
|
||||
return obj.ID, len(obj.ID) > 0
|
||||
case "platforms":
|
||||
// TODO(stevvooe): Another case here where have multiple values.
|
||||
// May need to refactor the filter system to allow filtering by
|
||||
|
||||
Reference in New Issue
Block a user