Skip to content

Instantly share code, notes, and snippets.

@Deleplace
Created January 9, 2019 16:44
Show Gist options
  • Save Deleplace/20bd88545d95aa63489f6fdb33239702 to your computer and use it in GitHub Desktop.
Save Deleplace/20bd88545d95aa63489f6fdb33239702 to your computer and use it in GitHub Desktop.
package datastorekey
import (
"testing"
"cloud.google.com/go/datastore"
)
func TestDocBug(t *testing.T) {
URLsafeKey := "ahRzfnByb2dyYW1taW5nLWlkaW9tc3IMCxIFSWRpb20YmgEM"
_, err := datastore.DecodeKey(URLsafeKey)
if err != nil {
t.Errorf("Error decoding URL-safe key: %v", err)
}
}
// Result:
// --- FAIL: TestDocBug (0.00s)
// cloud_datastore_doc_bug_test.go:13: Error decoding URL-safe key: datastore: invalid key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment