mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
cmd/present: address minor comments not applied in a previous change
These changes were suggested in golang.org/cl/140841 but were not applied in that change. They are small documentation fixes and a switch from using fmt.Fprintf/os.Exit to log.Fatalf. Change-Id: I9393261f8f28b589678866dd7b8904d46629fb4b Reviewed-on: https://go-review.googlesource.com/c/141685 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
c0eb142035
commit
13216ffa54
@ -25,7 +25,7 @@ var (
|
|||||||
originHost = flag.String("orighost", "", "host component of web origin URL (e.g., 'localhost')")
|
originHost = flag.String("orighost", "", "host component of web origin URL (e.g., 'localhost')")
|
||||||
basePath = flag.String("base", "", "base path for slide template and static resources")
|
basePath = flag.String("base", "", "base path for slide template and static resources")
|
||||||
contentPath = flag.String("content", ".", "base path for presentation content")
|
contentPath = flag.String("content", ".", "base path for presentation content")
|
||||||
usePlayground = flag.Bool("use_playground", false, "if false, arbitrary code (Go, shell scripts, etc.) is run locally via WebSocket transport; otherwise it uses play.golang.org")
|
usePlayground = flag.Bool("use_playground", false, "run code snippets using play.golang.org; if false, run them locally and deliver results by WebSocket transport")
|
||||||
nativeClient = flag.Bool("nacl", false, "use Native Client environment playground (prevents non-Go code execution) when using local WebSocket transport")
|
nativeClient = flag.Bool("nacl", false, "use Native Client environment playground (prevents non-Go code execution) when using local WebSocket transport")
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -43,8 +43,7 @@ func main() {
|
|||||||
*httpAddr = fmt.Sprintf("0.0.0.0:%s", port)
|
*httpAddr = fmt.Sprintf("0.0.0.0:%s", port)
|
||||||
pwd, err := os.Getwd()
|
pwd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Couldn't get pwd: %v\n", err)
|
log.Fatalf("Couldn't get pwd: %v\n", err)
|
||||||
os.Exit(1)
|
|
||||||
}
|
}
|
||||||
*basePath = pwd
|
*basePath = pwd
|
||||||
*usePlayground = true
|
*usePlayground = true
|
||||||
@ -139,7 +138,7 @@ const localhostWarning = `
|
|||||||
WARNING! WARNING! WARNING!
|
WARNING! WARNING! WARNING!
|
||||||
|
|
||||||
The present server appears to be listening on an address that is not localhost
|
The present server appears to be listening on an address that is not localhost
|
||||||
and using socket transport for running Go code. Anyone with access to this address
|
and is configured to run code snippets locally. Anyone with access to this address
|
||||||
and port will have access to this machine as the user running present.
|
and port will have access to this machine as the user running present.
|
||||||
|
|
||||||
To avoid this message, listen on localhost, run with -play=false, or run with
|
To avoid this message, listen on localhost, run with -play=false, or run with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user