pixel icon indicating copy to clipboard operation
pixel copied to clipboard

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

Open unalmitatefe opened this issue 4 years ago • 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

unalmitatefe avatar Jan 22 '21 09:01 unalmitatefe

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).

Asday avatar Jan 22 '21 10:01 Asday

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?

unalmitatefe avatar Jan 22 '21 10:01 unalmitatefe

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!

Asday avatar Jan 22 '21 13:01 Asday

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

dusk125 avatar Jan 22 '21 17:01 dusk125

Could you solve it? I have the same problem

Edit: nevermind, it was just the $GOPATH

gaxln avatar Jun 04 '21 14:06 gaxln

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

dusk125 avatar Jun 22 '21 12:06 dusk125