1
0
mirror of https://github.com/golang/go synced 2024-11-05 17:36:15 -07:00
go/cmd/present/play_http.go
Andrew Gerrand 51ebb3f1be cmd/present: move critical _ import to another file
This was preventing the playground /compile and /share handlers
from being registered under Managed VMs.

Change-Id: I690bd50abc2f42b30956e734903d09487f712d4a
Reviewed-on: https://go-review.googlesource.com/14665
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-09-17 03:09:26 +00:00

24 lines
491 B
Go

// Copyright 2015 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 appenginevm
package main
import (
"net/url"
"golang.org/x/tools/present"
_ "golang.org/x/tools/playground"
)
func initPlayground(basepath string, origin *url.URL) {
playScript(basepath, "HTTPTransport")
}
func playable(c present.Code) bool {
return present.PlayEnabled && c.Play && c.Ext == ".go"
}