Why doesn't Gotour run when I move the file %GOROOT%\tour.exe to foo\tour.exe?

WBOY
Release: 2024-02-06 09:30:04
forward
823 people have browsed it

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

Question content

  1. I read https://go.dev/tour/welcome/3

  2. My environment

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>
Copy after login
  • I run cmd,
  • go install golang.org/x/website/tour@latest
    Copy after login

    I have

    I runc:\users\donhu\go\bin\tour.exeok

    Why does gotour not run when I move the file%goroot%\tour.exetofoo\tour.exe?


    Correct answer


    Because port3999is in use.

    //m.sbmmt.com/link/c0a3eab00393c89313e8109bb6504a68

    tour.execan be run independently in each folder.

    The above is the detailed content of Why doesn't Gotour run when I move the file %GOROOT%\tour.exe to foo\tour.exe?. For more information, please follow other related articles on the PHP Chinese website!

    source:stackoverflow.com
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!