Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions types/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ type MetadataModuleError struct {
Name string `json:"name"`
Doc []string `json:"doc"`
Fields []ModuleErrorField `json:"fields,omitempty"`
Index int `json:"index"`
}

type ModuleErrorField struct {
Expand All @@ -762,6 +763,7 @@ func (m *MetadataModuleError) Process() {
for _, v := range docs {
docsArr = append(docsArr, v.(string))
}
cm.Index = m.ProcessAndUpdateData("U8").(int)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will affect metadata parsing before v14

cm.Doc = docsArr
m.Value = cm
}
Expand Down
2 changes: 1 addition & 1 deletion types/v14.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (m *MetadataV14Decoder) Process() {
}

for _, variant := range variants.Variants {
moduleErr := MetadataModuleError{Name: variant.Name, Doc: variant.Docs}
moduleErr := MetadataModuleError{Name: variant.Name, Doc: variant.Docs, Index: variant.Index}
for _, field := range variant.Fields {
moduleErr.Fields = append(moduleErr.Fields, ModuleErrorField{Doc: field.Docs, TypeName: field.TypeName, Type: metadataSiType[field.Type]})
}
Expand Down
Loading