rename Read / Write into Unmarshal / Marshal when needed

Read() / Write() are used to read / write from streams, while
Unmarshal() / Marshal() are used to decode / encode from / to bytes.
This commit is contained in:
aler9
2022-06-27 17:26:00 +02:00
parent e3c9f0c2e6
commit f3b0fc69b4
44 changed files with 569 additions and 559 deletions

View File

@@ -30,7 +30,7 @@ func NewSender(v base.HeaderValue, user string, pass string) (*Sender, error) {
return ""
}(); v0 != "" {
var auth headers.Authenticate
err := auth.Read(base.HeaderValue{v0})
err := auth.Unmarshal(base.HeaderValue{v0})
if err != nil {
return nil, err
}
@@ -61,7 +61,7 @@ func NewSender(v base.HeaderValue, user string, pass string) (*Sender, error) {
return ""
}(); v0 != "" {
var auth headers.Authenticate
err := auth.Read(base.HeaderValue{v0})
err := auth.Unmarshal(base.HeaderValue{v0})
if err != nil {
return nil, err
}
@@ -112,5 +112,5 @@ func (se *Sender) AddAuthorization(req *base.Request) {
req.Header = make(base.Header)
}
req.Header["Authorization"] = h.Write()
req.Header["Authorization"] = h.Marshal()
}