Skip to content

Commit

Permalink
Merge pull request #3 from blefort/update
Browse files Browse the repository at this point in the history
fix int to str conversion
  • Loading branch information
blefort committed Jan 21, 2024
2 parents c59ec77 + d292472 commit 0cd33ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions DTD/DTD.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
//
// Found this reference very usefull: https://xmlwriter.net/xml_guide/attlist_declaration.shtml
//
// This is a simplified implementation
// # This is a simplified implementation
//
// This package offers one struct per DTD blocks
// Each struct will implements the IDTDBlock
// the IDTDBlock is necessary for the parser to populate and process its collection
package DTD

import (
"fmt"
"strings"
)

Expand Down Expand Up @@ -96,7 +97,7 @@ func Translate(i int) string {
case NOTATION:
return "Notation"
default:
panic("Unknown type" + string(i) + " requested")
panic("Unknown type" + fmt.Sprintf("%d", i) + " requested")
}
}

Expand Down
3 changes: 2 additions & 1 deletion scanner/sentence.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package scanner

import (
"fmt"
"strings"

"github.com/blefort/DTDParser/DTD"
Expand Down Expand Up @@ -39,7 +40,7 @@ func newsentence(start string, end string, Log *zap.SugaredLogger) *sentence {
func (se *sentence) MarshalLogObject(enc zapcore.ObjectEncoder) error {

for i, w := range se.words {
enc.AddString("Word "+string(i), w.Read())
enc.AddString(fmt.Sprintf("Word %d", i), w.Read())
}
return nil
}
Expand Down

0 comments on commit 0cd33ab

Please sign in to comment.