Skip to content

Instantly share code, notes, and snippets.

@jamesharr
Created January 4, 2014 03:18
Show Gist options
  • Save jamesharr/8251159 to your computer and use it in GitHub Desktop.
Save jamesharr/8251159 to your computer and use it in GitHub Desktop.
For go-lang-idea-plugin bug #115
// $GOPATH/foopkg/whatever.go
package asdf
var X = "Hello"
package main
import (
"foopkg"
"fmt"
)
func main() {
// Package name in code is "asdf", but it's imported from "foopkg/*.go"
// This is valid behavior in Go. While I wouldn't condone it, it allows for package names with dashes in them.
fmt.Println(asdf.X)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment