Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TheFlowDevelopment opened this issue Jan 22, 2021 · 6 comments
Open

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

TheFlowDevelopment opened this issue Jan 22, 2021 · 6 comments

Comments

@TheFlowDevelopment
Copy link

TheFlowDevelopment commented Jan 22, 2021

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

@TheFlowDevelopment TheFlowDevelopment changed the title Issue in pixelgl, cannt import "." package? Issue in pixelgl, can not import "." package? Jan 22, 2021
@Asday
Copy link

Asday commented Jan 22, 2021

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

@TheFlowDevelopment
Copy link
Author

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
Copy link

Asday commented Jan 22, 2021

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!

@dusk125
Copy link
Collaborator

dusk125 commented Jan 22, 2021

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

@gaxln
Copy link

gaxln commented Jun 4, 2021

Could you solve it? I have the same problem

Edit: nevermind, it was just the $GOPATH

@dusk125
Copy link
Collaborator

dusk125 commented Jun 22, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants