faiface/pixel

Issue in pixelgl, can not import "." package?

Opened this issue · 6 comments

i have a code like this for my idie game:

package main

import (
	"github.com/faiface/pixel"
	"github.com/faiface/pixel/pixelgl"
)

func run() {
	// all of our code will be fired up from here
	cfg := pixelgl.WindowConfig{
		Title:  "Pixel Rocks!",
		Bounds: pixel.R(0, 0, 1024, 768),
	}
	win, err := pixelgl.NewWindow(cfg)
	if err != nil {
		panic(err)
	}
	for !win.Closed() {
		win.Update()
	}
}

func main() {
	pixelgl.Run(run)
}

But if i build the main.go OR run the file i getting this issue:
cannot find package "." in: C:\Go\src\github.com\faiface\pixel\pixelgl

i tryed:
go get github.com\faiface\pixel\pixelgl
and
go get github.com\faiface\pixel

Asday commented

Just a sidenote - if you want to post a multiline code snippet, you need to use triple backticks to make it a code block:

like
this

(You can click "quote reply" in the menu at the top-right of my comment to see what that looks like before formatting).

Just a sidenote - if you want to post a multiline code snippet, you need to use triple backticks to make it a code block:

like
this

(You can click "quote reply" in the menu at the top-right of my comment to see what that looks like before formatting).

ok. got it. So whats the problem?

Asday commented

My apologies, I'm not in a position to try it out right now, just wanted to help you improve your question so the future answerer has an easier time. Good luck!

Can you post the value of your GOPATH and GOROOT please?

Could you solve it? I have the same problem

Edit: nevermind, it was just the $GOPATH

@TheFlowDevelopment are you still having issues? If so, please post your GOPATH AND GOROOT; if not, please close this issue. Thanks!