首页 > 后端开发 > Golang > 正文

为什么当我将文件 %GOROOT%\tour.exe 移动到 foo\tour.exe 时,Gotour 无法运行?

WBOY
发布: 2024-02-06 09:30:04
转载
865 人浏览过

为什么当我将文件 %GOROOT%\tour.exe 移动到 foo\tour.exe 时,Gotour 无法运行?

问题内容

  1. 我阅读了 https://go.dev/tour/welcome/3

  2. 我的环境

microsoft windows [version 10.0.22621.1265]
(c) microsoft corporation. all rights reserved.

c:\users\donhu>go env
set go111module=
set goarch=amd64
set gobin=
set gocache=c:\users\donhu\appdata\local\go-build
set goenv=c:\users\donhu\appdata\roaming\go\env
set goexe=.exe
set goexperiment=
set goflags=
set gohostarch=amd64
set gohostos=windows
set goinsecure=
set gomodcache=c:\users\donhu\go\pkg\mod
set gonoproxy=
set gonosumdb=
set goos=windows
set gopath=c:\users\donhu\go
set goprivate=
set goproxy=https://proxy.golang.org,direct
set goroot=c:\program files\go
set gosumdb=sum.golang.org
set gotmpdir=
set gotooldir=c:\program files\go\pkg\tool\windows_amd64
set govcs=
set goversion=go1.20.1
set gccgo=gccgo
set goamd64=v1
set ar=ar
set cc=gcc
set cxx=g++
set cgo_enabled=0
set gomod=nul
set gowork=
set cgo_cflags=-o2 -g
set cgo_cppflags=
set cgo_cxxflags=-o2 -g
set cgo_fflags=-o2 -g
set cgo_ldflags=-o2 -g
set pkg_config=pkg-config
set gogccflags=-m64 -fno-caret-diagnostics -qunused-arguments -wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=c:\users\donhu\appdata\local\temp\go-build1095406662=/tmp/go-build -gno-record-gcc-switches

c:\users\donhu>
登录后复制
  • 我运行 cmd,
  • go install golang.org/x/website/tour@latest
    登录后复制

    我有

    我运行 c:usersdonhugobintour.exe ok

    为什么当我将文件 %goroot%tour.exe 移动到 footour.exe 时,gotour 无法运行?%goroot%tour.exe 移动到 footour.exe 时,gotour 无法运行?


    正确答案


    因为端口3999

    正确答案

    因为端口3999正在使用中。

    https://www.php.cn/link/c0a3eab00393c89313e8109bb6504a68tour.exe

    🎜🎜 可以在每个文件夹中独立运行。🎜

    以上是为什么当我将文件 %GOROOT%\tour.exe 移动到 foo\tour.exe 时,Gotour 无法运行?的详细内容。更多信息请关注PHP中文网其他相关文章!

    来源:stackoverflow.com
    本站声明
    本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
    热门教程
    更多>
    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板
    关于我们 免责声明 Sitemap
    PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!