Commits

Feo...@feodor-pc  committed 8b54afa

Project folder structure updated

  • Participants
  • Parent commits d8c6fc7

Comments (0)

Files changed (5)

-set GOPATH=%BuildFolder%
+set GOPATH=%SrcFolder%
 echo %GOPATH%
-cd %SrcFolder%
 go test -v ./...

File pkg/greet/greet.go

-package greet
-
-import (
-	"fmt"
-)
-
-type Greet struct {
-	who string
-}
-
-func NewGreeter(who string) *Greet {
-	return &Greet{who: who}
-}
-
-func (g *Greet) String() string {
-	return fmt.Sprintf("Hello %s", g.who)
-}

File pkg/greet/greet_test.go

-package greet_test
-
-import (
-	"testing"
-
-	"greet"
-)
-
-func TestGreeting(t *testing.T) {
-	expected := "Hello AppVeyor"
-	g := greet.NewGreeter("AppVeyor")
-
-	if g.String() != expected {
-		t.Errorf("Expected %s, got %s", expected, g)
-	}
-}

File src/greet/greet.go

+package greet
+
+import (
+	"fmt"
+)
+
+type Greet struct {
+	who string
+}
+
+func NewGreeter(who string) *Greet {
+	return &Greet{who: who}
+}
+
+func (g *Greet) String() string {
+	return fmt.Sprintf("Hello %s", g.who)
+}

File src/greet/greet_test.go

+package greet_test
+
+import (
+	"testing"
+
+	"greet"
+)
+
+func TestGreeting(t *testing.T) {
+	expected := "Hello AppVeyor"
+	g := greet.NewGreeter("AppVeyor")
+
+	if g.String() != expected {
+		t.Errorf("Expected %s, got %s", expected, g)
+	}
+}