为什么我的存储实体使用默认值?

I am saying

data := Thing {
    date:     time.Now().UnixNano()   
    name:     "foo",
    value:    5,
}
_, err := datastore.Put(c, datastore.NewIncompleteKey(c, "stuff", nil), &data)
if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
}

What is getting stored is {0, "", 0}. I expect to see something like {1366370653722376000, "foo", 5}. What am I doing wrong?

Note: I am using the dev appserver.

You must export the names you want to be visible outside your package. To achieve that you must use as its first letter any Unicode upper-case-class (which ASCII upper case letters are a subset), e.g. Date instead of date, Name instead of name, etc.

Without that the datastore.Put cannot "see" (using reflection) the fields.