Verifying installation of Golang's Present tool


(Ross Larson) #1

Hello, everyone.

I’ve been trying to understand how to verify that I’ve properly installed and configured golang’s present tool. I tried it in Windows 10 as well as Ubuntu 16.04.

I installed golang in Windows using chocolatey. I did choco install golang from the administrator command prompt. That appeared to do the trick for installing go, and from my home directory, the results of go version is:
go version go1.10.2 windows/amd64

I want to install and run golang’s present tool to make and run a presentation, as I’m doing a session on golang for a tech conference, and I was planning on using the present tool to run the presentation.

I ran both go get golang.org/x/tools/present and go install golang.org/x/tools/present, but when I run the present command, the results in windows are:

present.exe : The term 'present.exe' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ present.exe
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (present.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Here are the results of my go env command:

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\rossl\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\rossl\go
set GORACE=
set GOROOT=C:\tools\go
set GOTMPDIR=
set GOTOOLDIR=C:\tools\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\rossl\AppData\Local\Temp\go-build460984806=/tmp/go-build -gno-record-gcc-switches

In the research I’ve done online, it doesn’t seem like anyone is having problems with this. I’m not sure if I’m missing something in the pathing, or something else. When I look at the contents of C:\tools\go\pkg\tool\windows_amd64, I would expect present.exe to be found in this directory, but it’s not there.

Here are the results of the go tool command:

addr2line
api
asm
buildid
cgo
compile
cover
dist
dist.exe~
doc
fix
go_bootstrap
link
nm
objdump
pack
pprof
test2json
tour
trace
vet

Have I done something wrong?

As an aside, I also installed LiteIDE, and that has an “Export to HTML” function in the IDE. I was able to export the test slide that I’ve created, so I can see the output of the slide file, but I still haven’t figured out how to actually present it, since I was planning to also make use of the .play template function.

I ran into similar problems in linux, but I noticed that one of my main problems with Ubuntu 16.04 was that installing golang from apt resulted in me getting an ancient version of golang. At this point, I’d like to focus on getting a windows solution, but if there’s a straighforward linux solution, I’m willing to go down that path.


(system) #2

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.