title: GAE/Go: Namespace not working
body: <p>I am trying to store datastore record in namespace <code>MyNameSpace</code> with GAE/Go, but the code below not working.</p>
  
  <pre><code>import (
      "cloud.google.com/go/datastore"
      "github.com/gin-gonic/gin"
      "google.golang.org/appengine"
  )
  
  func Save(c *gin.Context, list []MyStruct) ([]MyStruct, error) {
      r := c.Request
      ctx := appengine.NewContext(r)
      ctx_with_namespace, err := appengine.Namespace(ctx, "MyNameSpace")
      if err != nil {
          return nil, err
      }
  
      client, err := datastore.NewClient(ctx_with_namespace, "MyProject")
      if err != nil {
          return nil, err
      }
  
      var keyList []*datastore.Key
      for _, v := range list {
          key := datastore.NameKey("MyStruct", v.ColA, nil)
          keyList = append(keyList, key)
      }
  
      _, err = client.PutMulti(ctx_with_namespace, keyList, list)
  
      return list,nil
  }
  </code></pre>
  
  <p>This code creates records in the default namespace, not <code>MyNameSpace</code>.</p>
  
  <p>Does <code>cloud.google.com/go/datastore</code> ignores namespace setting?</p>