mirror of https://github.com/dsoprea/go-exif.git
type_encode.go: Add redundancy comments
parent
3a4fc51e30
commit
1ae6e31ca9
|
@ -17,6 +17,8 @@ var (
|
||||||
type EncodedData struct {
|
type EncodedData struct {
|
||||||
Type TagTypePrimitive
|
Type TagTypePrimitive
|
||||||
Encoded []byte
|
Encoded []byte
|
||||||
|
|
||||||
|
// TODO(dustin): Is this really necessary? We might have this just to correlate to the incoming stream format (raw bytes and a unit-count both for incoming and outgoing).
|
||||||
UnitCount uint32
|
UnitCount uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,6 +187,8 @@ func (ve *ValueEncoder) Encode(value interface{}) (ed EncodedData, err error) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// TODO(dustin): This is redundant with EncodeWithType. Refactor one to use the other.
|
||||||
|
|
||||||
switch value.(type) {
|
switch value.(type) {
|
||||||
case []byte:
|
case []byte:
|
||||||
ed, err = ve.encodeBytes(value.([]byte))
|
ed, err = ve.encodeBytes(value.([]byte))
|
||||||
|
@ -223,6 +227,8 @@ func (ve *ValueEncoder) EncodeWithType(tt TagType, value interface{}) (ed Encode
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// TODO(dustin): This is redundant with Encode. Refactor one to use the other.
|
||||||
|
|
||||||
switch tt.Type() {
|
switch tt.Type() {
|
||||||
case TypeByte:
|
case TypeByte:
|
||||||
ed, err = ve.encodeBytes(value.([]byte))
|
ed, err = ve.encodeBytes(value.([]byte))
|
||||||
|
|
Loading…
Reference in New Issue