Skip to content

Commit

Permalink
Resolve linter errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SBGoods committed Aug 20, 2024
1 parent 8e21a5d commit 138a516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linters:
- unconvert
- unparam
- unused
- vet
- govet

run:
# Prevent false positive timeouts in CI
Expand Down
6 changes: 3 additions & 3 deletions internal/convert/element_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (e ElementType) ElementType() []byte {
}
case e.elementType.Map != nil:
if e.elementType.Map.CustomType != nil {
b.WriteString(fmt.Sprintf(e.elementType.Map.CustomType.Type))
b.WriteString(e.elementType.Map.CustomType.Type)
} else {
b.WriteString(fmt.Sprintf("types.MapType{\nElemType: %s,\n}", NewElementType(e.elementType.Map.ElementType).ElementType()))
}
Expand All @@ -65,13 +65,13 @@ func (e ElementType) ElementType() []byte {
}
case e.elementType.Object != nil:
if e.elementType.Object.CustomType != nil {
b.WriteString(fmt.Sprintf(e.elementType.Object.CustomType.Type))
b.WriteString(e.elementType.Object.CustomType.Type)
} else {
b.WriteString(fmt.Sprintf("types.ObjectType{\nAttrTypes: map[string]attr.Type{\n%s\n},\n}", NewObjectAttributeTypes(e.elementType.Object.AttributeTypes).AttributeTypes()))
}
case e.elementType.Set != nil:
if e.elementType.Set.CustomType != nil {
b.WriteString(fmt.Sprintf(e.elementType.Set.CustomType.Type))
b.WriteString(e.elementType.Set.CustomType.Type)
} else {
b.WriteString(fmt.Sprintf("types.SetType{\nElemType: %s,\n}", NewElementType(e.elementType.Set.ElementType).ElementType()))
}
Expand Down

0 comments on commit 138a516

Please sign in to comment.