MCPcopy
hub / github.com/TarsCloud/TarsGo / ReadFrom

Method ReadFrom

tars/protocol/res/authf/AuthF.go:801–820  ·  view source on GitHub ↗

ReadFrom reads from readBuf and put into struct.

(readBuf *codec.Reader)

Source from the content-addressed store, hash-verified

799
800// ReadFrom reads from readBuf and put into struct.
801func (st *ApplyTokenRequest) ReadFrom(readBuf *codec.Reader) error {
802 var (
803 err error
804 length int32
805 have bool
806 ty byte
807 )
808 st.ResetDefault()
809
810 err = st.SKey.ReadBlock(readBuf, 1, true)
811 if err != nil {
812 return err
813 }
814
815 _ = err
816 _ = length
817 _ = have
818 _ = ty
819 return nil
820}
821
822// ReadBlock reads struct from the given tag , require or optional.
823func (st *ApplyTokenRequest) ReadBlock(readBuf *codec.Reader, tag byte, require bool) error {

Callers 1

ReadBlockMethod · 0.95

Calls 2

ResetDefaultMethod · 0.95
ReadBlockMethod · 0.65

Tested by

no test coverage detected