2014-05-05 15:55:27 -06:00
|
|
|
// Copyright 2012 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// +build appengine
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2014-06-02 22:16:59 -06:00
|
|
|
"mime"
|
|
|
|
|
2014-11-09 14:50:40 -07:00
|
|
|
"golang.org/x/tools/present"
|
2014-05-05 15:55:27 -06:00
|
|
|
|
2014-11-09 14:50:40 -07:00
|
|
|
_ "golang.org/x/tools/playground"
|
2014-05-05 15:55:27 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
var basePath = "./present/"
|
|
|
|
|
|
|
|
func init() {
|
2014-07-07 23:27:33 -06:00
|
|
|
initTemplates(basePath)
|
2014-05-05 15:55:27 -06:00
|
|
|
playScript(basePath, "HTTPTransport")
|
|
|
|
present.PlayEnabled = true
|
2014-06-02 22:16:59 -06:00
|
|
|
|
|
|
|
// App Engine has no /etc/mime.types
|
|
|
|
mime.AddExtensionType(".svg", "image/svg+xml")
|
2014-05-05 15:55:27 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func playable(c present.Code) bool {
|
|
|
|
return present.PlayEnabled && c.Play && c.Ext == ".go"
|
|
|
|
}
|