github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/cmd/present/play_http.go (about)

     1  // Copyright 2015 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build appengine appenginevm
     6  
     7  package main
     8  
     9  import (
    10  	"net/url"
    11  
    12  	"golang.org/x/tools/present"
    13  
    14  	_ "golang.org/x/tools/playground"
    15  )
    16  
    17  func initPlayground(basepath string, origin *url.URL) {
    18  	playScript(basepath, "HTTPTransport")
    19  }
    20  
    21  func playable(c present.Code) bool {
    22  	return present.PlayEnabled && c.Play && c.Ext == ".go"
    23  }