Skip to content

Commit

Permalink
Oops...
Browse files Browse the repository at this point in the history
  • Loading branch information
beito123 committed Mar 9, 2019
1 parent 274bc03 commit bf4b66d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func getTagByID(id byte) Tag {
return new(Compound)
case IDTagIntArray:
return new(IntArray)
case IDTagLongArray:
return new(LongArray)
}

return nil
Expand Down Expand Up @@ -75,6 +77,8 @@ func GetTagName(id byte) string {
return "Compound"
case IDTagIntArray:
return "IntArray"
case IDTagLongArray:
return "LongArray"
}

return "Unknown"
Expand Down Expand Up @@ -2164,6 +2168,11 @@ func (t *LongArray) ToString() (string, error) {
return str + " ]", nil
}

// ToIntArray returns value as []int32
func (t *LongArray) ToIntArray() ([]int32, error) {
return nil, errors.New("couldn't cast to []int32")
}

// ToLongArray returns value as []int64
func (t *LongArray) ToLongArray() ([]int64, error) {
return t.Value, nil
Expand Down

0 comments on commit bf4b66d

Please sign in to comment.