go.talks/pkg/playground: remove package
The package has been moved to
code.google.com/p/go.tools/godoc/playground
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/11421044
diff --git a/pkg/playground/appengine.go b/pkg/playground/appengine.go
deleted file mode 100644
index 073b419..0000000
--- a/pkg/playground/appengine.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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 playground
-
-import (
- "net/http"
-
- "appengine"
- "appengine/urlfetch"
-)
-
-func client(r *http.Request) *http.Client {
- return urlfetch.Client(appengine.NewContext(r))
-}
-
-func report(r *http.Request, err error) {
- appengine.NewContext(r).Errorf("%v", err)
-}
diff --git a/pkg/playground/common.go b/pkg/playground/common.go
deleted file mode 100644
index 94b806a..0000000
--- a/pkg/playground/common.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2013 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.
-
-// Package playground registers an HTTP handler at "/compile" that
-// proxies requests to the golang.org playground service.
-package playground
-
-import (
- "bytes"
- "fmt"
- "io"
- "net/http"
-)
-
-const baseURL = "http://play.golang.org"
-
-func init() {
- http.HandleFunc("/compile", bounce)
- http.HandleFunc("/share", bounce)
-}
-
-func bounce(w http.ResponseWriter, r *http.Request) {
- b := new(bytes.Buffer)
- if err := passThru(b, r); err != nil {
- http.Error(w, "Server error.", http.StatusInternalServerError)
- report(r, err)
- return
- }
- io.Copy(w, b)
-}
-
-func passThru(w io.Writer, req *http.Request) error {
- defer req.Body.Close()
- url := baseURL + req.URL.Path
- r, err := client(req).Post(url, req.Header.Get("Content-type"), req.Body)
- if err != nil {
- return fmt.Errorf("making POST request: %v", err)
- }
- defer r.Body.Close()
- if _, err := io.Copy(w, r.Body); err != nil {
- return fmt.Errorf("copying response Body: %v", err)
- }
- return nil
-}
diff --git a/pkg/playground/local.go b/pkg/playground/local.go
deleted file mode 100644
index b114b87..0000000
--- a/pkg/playground/local.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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 playground
-
-import (
- "log"
- "net/http"
-)
-
-func client(r *http.Request) *http.Client {
- return http.DefaultClient
-}
-
-func report(r *http.Request, err error) {
- log.Println(err)
-}