As you may know, the Go developers intend to launch Go 1 in the coming
weeks. In preparation for this we are providing a beta version of the
Go 1 runtime (go1beta). This will allow you to test your apps under
the new Go 1 runtime.
The go1beta runtime should be considered unstable and should not be
used for production apps. Before the Go 1 launch we may make changes
that cause go1beta apps to fail without notice.
You may download the beta SDK from the appengine-go project:
http://code.google.com/p/appengine-go/downloads/list
To use go1beta, update your app.yaml file to use the new api_version:
api_version: go1beta
The final Go 1 runtime will be api_version 'go1' and go1beta will be retired.
There are many backward-incompatible changes between api_version 3 and
go1beta. The SDK includes the gofix program to automatically update Go
code to use the new Go 1 and App Engine APIs. Some code may need to be
updated by hand, but all such cases should be flagged as compile
errors during testing or deployment.
Changes to the App Engine runtime between version 3 and go1beta are
described in the RELEASE_NOTES file in the root directory of the SDK.
The go1beta is currently based on Go weekly.2012-01-27, documented here:
http://weekly.golang.org/
Changes between Go release.r60.3 (the base for version 3) and
weekly.2012-01-27 are summarized in this document:
http://weekly.golang.org/doc/go1.html
Your feedback and bug reports are most appreciated.
Andrew
The timing is getting a bit tight for the Go 1 launch. We're in API
freeze now until launch.
We're still exploring this, but this wouldn't be a
backward-incompatible change so it can happen after the Go 1 launch.
Thanks for your patience,
Andrew
Just define your own map type that implements PropertyLoadSaver. Something like:
type Map map[string]interface{}
func (m Map) Load(c <-chan datastore.Property) error {
for p := range c {
if p.Multiple {
return errors.New("Map does not support
multiple properties")
}
m[p.Name] = p.Value
}
return nil
}
func (m Map) Save(c chan<- datastore.Property) error {
defer close(c)
for k, v := range m {
c <- datastore.Property{
Name: k,
Value: v,
}
}
return nil
}
It's on my list of things to do, but I don't have anything to share yet.
Look for the p.Multiple field in the property. If present, set the map
value to a []T instead of a T, where T is the type of p.Value. If the
map already has an slice value for that key, append the value to the
existing slice.
You will have to use the reflect package.
Oh, I was imagining that you'd want the values to be things like []int
or []string.
If you're happy with a map[string][]interface (and note the second
"[]"), then that's easy:
m[p.Name] = append(m[p.Name], p.Value)
> Is it possible to use the go command to build my appengine application?
Maybe someday, but not yet.
Dave.
I've just uploaded new versions of the go1beta SDKs to
http://code.google.com/p/appengine-go/downloads/list, based on
weekly.2012-02-07. The production environment will be updated later
today without further notice.
Enjoy!
Dave.
Dave.
> Unfortunately a bug sneaked in which I is already fixed in the Go repository.
Yes, that has already been reported. It will be fixed in the next SDK.
On Mon, Mar 5, 2012 at 3:10 AM, Alexandru Moșoi wrote:> Unfortunately a bug sneaked in which I is already fixed in the Go repository.
Yes, that has already been reported. It will be fixed in the next SDK.
> Related, and perhaps already reported:
>
> The template use in demos/moustachio/moustachio/http.go is incorrect.
> template.MustParseFile(x, nil)
> should be:
> template.Must(template.ParseFiles(x))
The Moustachio example is very broken. I'll fix it for the next SDK release.
Dave.
Thanks all,
Dave.