mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-26 13:44:24 +00:00
dd3603c341
This makes gotty-client still work.
20 lines
346 B
Go
20 lines
346 B
Go
package webtty
|
|
|
|
type Decoder interface {
|
|
Decode(dst, src []byte) (int, error)
|
|
}
|
|
|
|
type Encoder interface {
|
|
Encode(dst, src []byte) (int, error)
|
|
}
|
|
|
|
type NullCodec struct{}
|
|
|
|
func (NullCodec) Encode(dst, src []byte) (int, error) {
|
|
return copy(dst, src), nil
|
|
}
|
|
|
|
func (NullCodec) Decode(dst, src []byte) (int, error) {
|
|
return copy(dst, src), nil
|
|
}
|