Skip empty tracking numbers
1 files changed, 5 insertions(+), 0 deletions(-) M utils.go
M utils.go => utils.go +5 -0
@@ 50,6 50,11 @@ type Tracking struct { } func (t *Tracking) UnmarshalText(data []byte) error { + // skip if empty + if len(data) == 0 { + return nil + } + parts := strings.FieldsFunc(string(data), func(r rune) bool { return r == '(' || r == ')' })