Local Godoc, Playground and imports

47 views
Skip to first unread message

Frank Davidson

unread,
Jan 4, 2017, 5:23:17 PM1/4/17
to golang-nuts
Hi all,

So, I have a local godoc running and I start it with the following bash script:

#!/bin/bash

export GOROOT=/go
export GOHOME=/go

/usr/local/go/bin/godoc -http=:8071 -play=true -index

I have the the packages I want to index in the /go directory.

It works fine except for when I want to run an example:

package main

import (
"fmt"
"server/media-systems/timeutils"
"time"
)

etc...

from within the godoc site, I get the following error:

tmp/sandbox896493756/main.go:5:2: cannot find package "server/media-systems/timeutils" in any of:
	/usr/local/go/src/server/media-systems/timeutils (from $GOROOT)
	/go/src/server/media-systems/timeutils (from $GOPATH)

But when I look in those directories, /usr/local/go/src and /go/src, the package server/media-systems/timeutils is definitely there...

I assume that there is a sandbox being created and that somehow I need to get my package into the sandbox?

Any help or ideas would be appreciated!!

Frank
Reply all
Reply to author
Forward
0 new messages