This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $GOPATH/foopkg/whatever.go | |
package asdf | |
var X = "Hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "github.com/jinzhu/gorm" | |
import ( | |
_ "github.com/lib/pq" | |
"fmt" | |
) | |
type Foo struct { | |
Id int64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recv := make(chan int) | |
send := make(chan int) | |
go func() { | |
queue = make([]int, 0) | |
done := false | |
for !done { | |
if len(queue) == 0 { | |
select { |
NewerOlder