Skip to content

Commit

Permalink
added nil checker
Browse files Browse the repository at this point in the history
  • Loading branch information
mfdeveloper508 committed Aug 11, 2023
1 parent 2c7d45d commit 84c958d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ type WriteEntry interface {
}

func (w *Writer) writeString(entry WriteEntry) error {
if entry == nil {
return nil
}

str := entry.String()
if len(str) == 0 {
return nil
Expand Down

0 comments on commit 84c958d

Please sign in to comment.