I'm running go1.6 and am getting the follow error when running "go build" in GOPATH (/Users/bweidlich/Projects/go)
main.go:6:2: cannot find package "github.com/spf13/viper" in any of:
/usr/local/go/src/github.com/spf13/viper (from $GOROOT)
/Users/bweidlich/Projects/go/src/github.com/spf13/viper (from $GOPATH)
Project structure:
bin/
glide.lock
glide.yaml
go.iml
logs/
main.go
pkg/
src/
vendor/
github.com/
deckarep/gosx-notifier
spf13/viper
gizak/termui
main.go
package main
import (
"fmt"
"github.com/gizak/termui" <--- doesn't resolve
"github.com/spf13/viper" <--- doesn't resolve
"log"
"bweidlich/dash"
"net/http"
"os"
"os/exec"
"time"
)
bin
,pkg
andsrc
in your project directory? Your project should be located at its import path. What is the overall structure here? – Myotonia