Commits

Nathan Youngman  committed 6f7cf9c

import a third-party library from Git

also use absolute paths within repo

  • Participants
  • Parent commits 78a7763

Comments (0)

Files changed (3)

File cmd/hello/main.go

 import (
 	"fmt"
 
-	"greet"
+	"bitbucket.org/appveyor/test-go/src/greet"
 )
 
 func main() {

File src/greet/greet.go

 
 import (
 	"fmt"
+
+	"github.com/koyachi/go-term-ansicolor/ansicolor"
 )
 
 type Greet struct {
 }
 
 func (g *Greet) String() string {
-	return fmt.Sprintf("Hello %s", g.who)
+	return ansicolor.Green(fmt.Sprintf("Hello %s", g.who))
 }

File src/greet/greet_test.go

 import (
 	"testing"
 
-	"greet"
+	"bitbucket.org/appveyor/test-go/src/greet"
 )
 
 func TestGreeting(t *testing.T) {
-	expected := "Hello AppVeyor"
+	expected := "\x1b[32mHello AppVeyor\x1b[0m"
 	g := greet.NewGreeter("AppVeyor")
 
 	if g.String() != expected {