Loading cmd/foo/foo.go 0 → 100644 +11 −0 Original line number Diff line number Diff line package main import ( "fmt" "repositories.muehmer.net/bsmrgo/foo/pkg/foo" ) func main() { fmt.Println(foo.Foo()) } pkg/foo/foo.go 0 → 100644 +9 −0 Original line number Diff line number Diff line package foo const ( textFoo = "foo" ) func Foo() string { return textFoo } pkg/foo/foo_test.go 0 → 100644 +9 −0 Original line number Diff line number Diff line package foo import "testing" func TestFooFoo(t *testing.T) { if r := Foo(); r != textFoo { t.Errorf("Foo() is %q, expected %q", r, textFoo) } } Loading
cmd/foo/foo.go 0 → 100644 +11 −0 Original line number Diff line number Diff line package main import ( "fmt" "repositories.muehmer.net/bsmrgo/foo/pkg/foo" ) func main() { fmt.Println(foo.Foo()) }
pkg/foo/foo.go 0 → 100644 +9 −0 Original line number Diff line number Diff line package foo const ( textFoo = "foo" ) func Foo() string { return textFoo }
pkg/foo/foo_test.go 0 → 100644 +9 −0 Original line number Diff line number Diff line package foo import "testing" func TestFooFoo(t *testing.T) { if r := Foo(); r != textFoo { t.Errorf("Foo() is %q, expected %q", r, textFoo) } }