We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8958f9d commit 8d81804Copy full SHA for 8d81804
base64.go
@@ -58,8 +58,7 @@ func (b64 *Base64Bytes) Scan(src interface{}) error {
58
case string:
59
return b64.Decode(v)
60
case []byte:
61
- new := append(Base64Bytes{}, v...)
62
- b64 = &new
+ *b64 = append(Base64Bytes{}, v...)
63
return nil
64
case RawJSON:
65
return b64.UnmarshalJSON(v)
base64_test.go
@@ -157,7 +157,7 @@ func TestScanBase64(t *testing.T) {
157
158
inputStr := "VGhpcyBpcyBhIHRlc3Qgc3RyaW5n"
159
inputJSON := RawJSON(`"` + inputStr + `"`)
160
- inputBytes := []byte(inputStr)
+ inputBytes := []byte(expecting)
161
inputInt := 3
162
163
var b Base64Bytes
0 commit comments