upgrade golang ci lint to 1.38.0 and fix lint error

This commit is contained in:
天元
2021-03-16 15:06:48 +08:00
parent f589471640
commit 1cdcf2ab48
10 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ func (def *CapabilityComponentDefinition) GetCapabilityObject(ctx context.Contex
}
err := k8sClient.Get(ctx, objectKey, &componentDefinition)
if err != nil {
return nil, fmt.Errorf("failed to get ComponentDefinition %s: %v", def.Name, err)
return nil, fmt.Errorf("failed to get ComponentDefinition %s: %w", def.Name, err)
}
def.ComponentDefinition = componentDefinition
capability, err = util.ConvertTemplateJSON2Object(name, componentDefinition.Spec.Extension, componentDefinition.Spec.Schematic)