修改一处receiver变量名称

This commit is contained in:
TOP糯米 2023-03-27 21:41:28 +08:00
parent 138728ad34
commit bc8c7d1e12
1 changed files with 6 additions and 6 deletions

View File

@ -9,17 +9,17 @@ type Base64 struct {
// Encode
// 编码
// @receiver q
// @receiver b
// @return string
func (q Base64) Encode() string {
return base64.StdEncoding.EncodeToString(q.Content)
func (b Base64) Encode() string {
return base64.StdEncoding.EncodeToString(b.Content)
}
// Decode
// 解码
// @receiver q
// @receiver b
// @return string
func (q Base64) Decode() string {
res, _ := base64.StdEncoding.DecodeString(string(q.Content))
func (b Base64) Decode() string {
res, _ := base64.StdEncoding.DecodeString(string(b.Content))
return string(res)
}