Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"play/pkgaccess/pkg"
)
func main() {
fmt.Println(pkg.Bar) // Huh, I an access it
lcl := pkg.Bar // Huuuh, I can create a copy of it.
@jamesharr
jamesharr / foo.go
Created January 4, 2014 03:18
For go-lang-idea-plugin bug #115
// $GOPATH/foopkg/whatever.go
package asdf
var X = "Hello"
@jamesharr
jamesharr / gist:8186831
Created December 30, 2013 19:31
Table naming bug in gorm
package main
import "github.com/jinzhu/gorm"
import (
_ "github.com/lib/pq"
"fmt"
)
type Foo struct {
Id int64
recv := make(chan int)
send := make(chan int)
go func() {
queue = make([]int, 0)
done := false
for !done {
if len(queue) == 0 {
select {