Simplify unmarshalling.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
package ipp
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
)
|
||||
|
||||
type KeyWord struct {
|
||||
sos *SetOfStrings
|
||||
}
|
||||
@@ -21,10 +25,6 @@ func (k KeyWord) String() string {
|
||||
return k.sos.String()
|
||||
}
|
||||
|
||||
func (k *KeyWord) size() int {
|
||||
return k.sos.size()
|
||||
}
|
||||
|
||||
func (k *KeyWord) valueTag() tag {
|
||||
return k.sos.valueTag()
|
||||
}
|
||||
@@ -33,7 +33,10 @@ func (k *KeyWord) marshal() []byte {
|
||||
return k.sos.marshal()
|
||||
}
|
||||
|
||||
func (k *KeyWord) unmarshal(byteStream *bufio.Reader) {
|
||||
k.sos.unmarshal(byteStream, keyWordValueTag)
|
||||
}
|
||||
|
||||
func (k *KeyWord) addValue(v interface{}) {
|
||||
k.sos.AddValue(v.(string))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user