18 lines
284 B
Go
18 lines
284 B
Go
|
package at
|
||
|
|
||
|
type Resp string
|
||
|
|
||
|
const RespNil = Resp("")
|
||
|
|
||
|
func (resp Resp) Check() bool {
|
||
|
return len(resp) >= 2 && resp[len(resp)-2:] == "OK"
|
||
|
}
|
||
|
|
||
|
func (resp Resp) RmFront(str string) Resp {
|
||
|
return Resp(string(resp)[len(str):])
|
||
|
}
|
||
|
|
||
|
func (resp Resp) Str() string {
|
||
|
return string(resp)
|
||
|
}
|