Skip to content

Commit

Permalink
fix: 修复大小写的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
guoqiang committed Dec 25, 2024
1 parent 70f7815 commit bf4e943
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions apipara.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (p *Paragraph) Style(val string) *Paragraph {
}

// NumPr number properties
func (p *Paragraph) NumPr(numId, ilvl string) *Paragraph {
func (p *Paragraph) NumPr(numID, ilvl string) *Paragraph {
if p.Properties == nil {
p.Properties = &ParagraphProperties{}
}
Expand All @@ -89,8 +89,8 @@ func (p *Paragraph) NumPr(numId, ilvl string) *Paragraph {
p.Properties.RunProperties = &RunProperties{}
}
p.Properties.NumProperties = &NumProperties{
NumId: &NumId{
Val: numId,
NumID: &NumID{
Val: numID,
},
Ilvl: &Ilevel{
Val: ilvl,
Expand Down
10 changes: 5 additions & 5 deletions structnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
// NumProperties show the number properties
type NumProperties struct {
XMLName xml.Name `xml:"w:numPr,omitempty"`
NumId *NumId
NumID *NumID
Ilvl *Ilevel
}

// NumId show the number id
type NumId struct {
// NumID show the number id
type NumID struct {
XMLName xml.Name `xml:"w:numId,omitempty"`
Val string `xml:"w:val,attr"`
}
Expand All @@ -38,9 +38,9 @@ func (n *NumProperties) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
if tt, ok := t.(xml.StartElement); ok {
switch tt.Name.Local {
case "numId":
var value NumId
var value NumID
value.Val = getAtt(tt.Attr, "val")
n.NumId = &value
n.NumID = &value
case "ilvl":
var value Ilevel
value.Val = getAtt(tt.Attr, "val")
Expand Down

0 comments on commit bf4e943

Please sign in to comment.