ReadFrom reads from readBuf and put into struct.
(readBuf *codec.Reader)
| 893 | |
| 894 | // ReadFrom reads from readBuf and put into struct. |
| 895 | func (st *ApplyTokenResponse) ReadFrom(readBuf *codec.Reader) error { |
| 896 | var ( |
| 897 | err error |
| 898 | length int32 |
| 899 | have bool |
| 900 | ty byte |
| 901 | ) |
| 902 | st.ResetDefault() |
| 903 | |
| 904 | err = st.SKey.ReadBlock(readBuf, 1, true) |
| 905 | if err != nil { |
| 906 | return err |
| 907 | } |
| 908 | |
| 909 | err = readBuf.ReadString(&st.SToken, 2, true) |
| 910 | if err != nil { |
| 911 | return err |
| 912 | } |
| 913 | |
| 914 | _ = err |
| 915 | _ = length |
| 916 | _ = have |
| 917 | _ = ty |
| 918 | return nil |
| 919 | } |
| 920 | |
| 921 | // ReadBlock reads struct from the given tag , require or optional. |
| 922 | func (st *ApplyTokenResponse) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error { |
no test coverage detected