From 0af572dd21c0aa79d13745b633ee24ba6c4d6cf1 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Wed, 14 Dec 2016 23:12:44 +0100 Subject: move plumbing from top level package to plumbing (#183) * plumbing: rename Object -> EncodedObject. * plumbing/storer: rename ObjectStorer -> EncodedObjectStorer. * move difftree to plumbing/difftree. * move diff -> utils/diff * make Object/Tag/Blob/Tree/Commit/File depend on storer. * Object and its implementations now depend only on storer.EncodedObjectStorer, not git.Repository. * Tests are decoupled accordingly. * move Object/Commit/File/Tag/Tree to plumbing/object. * move Object/Commit/File/Tag/Tree to plumbing/object. * move checkClose to utils/ioutil. * move RevListObjects to plumbing/revlist.Objects. * move DiffTree to plumbing/difftree package. * rename files with plural nouns to singular * plumbing/object: add GetBlob/GetCommit/GetTag/GetTree. --- examples/showcase/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/showcase/main.go') diff --git a/examples/showcase/main.go b/examples/showcase/main.go index ff5c7d3..4d1206d 100644 --- a/examples/showcase/main.go +++ b/examples/showcase/main.go @@ -6,6 +6,8 @@ import ( "strings" "gopkg.in/src-d/go-git.v4" + "gopkg.in/src-d/go-git.v4/plumbing/object" + . "gopkg.in/src-d/go-git.v4/examples" ) @@ -42,7 +44,7 @@ func main() { CheckIfError(err) // ... get the files iterator and print the file - tree.Files().ForEach(func(f *git.File) error { + tree.Files().ForEach(func(f *object.File) error { fmt.Printf("100644 blob %s %s\n", f.Hash, f.Name) return nil }) -- cgit