Skip to content

Commit

Permalink
When element references simple type it should still be considered to …
Browse files Browse the repository at this point in the history
…be "string"

Addressing:
 # github.com/gocomply/scap/pkg/scap/models/oval_def
pkg/scap/models/oval_def/models.go:106:20: cannot refer to unexported name oval.string
pkg/scap/models/oval_def/models.go:106:20: undefined: oval.string
  • Loading branch information
isimluk committed Oct 30, 2020
1 parent eb8f0b4 commit aad9022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/xsd/element.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (e *Element) ContainsText() bool {
}

func (e *Element) isPlainString() bool {
return e.SimpleType != nil || (e.Type == "" && e.Ref == "" && e.ComplexType == nil)
return e.SimpleType != nil || (e.Type == "" && e.Ref == "" && e.ComplexType == nil) || (e.typ != nil && e.typ.GoTypeName() == "string")
}

func (e *Element) isArray() bool {
Expand Down

0 comments on commit aad9022

Please sign in to comment.