summaryrefslogtreecommitdiff
path: root/submodule_test.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-06-28 00:58:31 +0200
committerCarlos Martín Nieto <[email protected]>2015-06-28 00:58:31 +0200
commitd2808d16101e113096b3a1c02e3f91122de74f15 (patch)
tree5dcb954b279e9760f867f84260858e4c9f0d75e5 /submodule_test.go
parent4b9cbd78fd266767f6bdf55257c4ee2b1611bbe0 (diff)
Create a SubmoduleCollection for managing submodules
Similarly to RemoteCollection, this allows us to namespace the submodule operations much more concisely and removes API on the Repository.
Diffstat (limited to 'submodule_test.go')
-rw-r--r--submodule_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/submodule_test.go b/submodule_test.go
index 27bc193..43c890a 100644
--- a/submodule_test.go
+++ b/submodule_test.go
@@ -10,11 +10,11 @@ func TestSubmoduleForeach(t *testing.T) {
seedTestRepo(t, repo)
- _, err := repo.AddSubmodule("http://example.org/submodule", "submodule", true)
+ _, err := repo.Submodules.Add("http://example.org/submodule", "submodule", true)
checkFatal(t, err)
i := 0
- err = repo.ForeachSubmodule(func(sub *Submodule, name string) int {
+ err = repo.Submodules.Foreach(func(sub *Submodule, name string) int {
i++
return 0
})