Skip to content

Instantly share code, notes, and snippets.

@border
Created January 12, 2011 08:56
Show Gist options
  • Save border/775899 to your computer and use it in GitHub Desktop.
Save border/775899 to your computer and use it in GitHub Desktop.
Go Programming Language Package Test
package filestuts
type File struct {
Fd int
Name string
}
include $(GOROOT)/src/Make.inc
all:
$(GC) numbers.go
$(GC) filestuts.go
$(GC) test.go
$(LD) -o test.out test.$O
clean:
rm -rf *.6 *.8 *.o *.out
package numbers
func Double(i int) int {
return i * 2
}
package main
import (
"./numbers"
"./filestuts"
"fmt"
)
func main() {
ret := numbers.Double(10)
fmt.Println(ret)
file := &filestuts.File{1, "String"}
fmt.Printf("%v\n", file)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment