Simplify encoding of basic structs
This commit is contained in:
parent
8d3319a7b4
commit
486b666132
6 changed files with 6 additions and 6 deletions
|
@ -21,5 +21,5 @@ func (x extSqlAll) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlAll) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("*")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ func (x extSqlAsc) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlAsc) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("ASC")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ func (x extSqlDesc) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlDesc) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("DESC")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ func (x extSqlEmpty) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlEmpty) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("EMPTY")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ func (x extSqlNull) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlNull) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("NULL")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ func (x extSqlVoid) ReadExt(dst interface{}, src []byte) {
|
|||
}
|
||||
|
||||
func (x extSqlVoid) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte("VOID")
|
||||
return []byte{0x00}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue