diff options
Diffstat (limited to 'entity')
-rw-r--r-- | entity/dag/example_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/entity/dag/example_test.go b/entity/dag/example_test.go index d034e59d..948d6aeb 100644 --- a/entity/dag/example_test.go +++ b/entity/dag/example_test.go @@ -336,14 +336,17 @@ func Read(repo repository.ClockedRepo, id entity.Id) (*ProjectConfig, error) { } func Example_entity() { + const gitBugNamespace = "git-bug" // Note: this example ignore errors for readability // Note: variable names get a little confusing as we are simulating both side in the same function // Let's start by defining two git repository and connecting them as remote repoRenePath, _ := os.MkdirTemp("", "") repoIsaacPath, _ := os.MkdirTemp("", "") - repoRene, _ := repository.InitGoGitRepo(repoRenePath) - repoIsaac, _ := repository.InitGoGitRepo(repoIsaacPath) + repoRene, _ := repository.InitGoGitRepo(repoRenePath, gitBugNamespace) + defer repoRene.Close() + repoIsaac, _ := repository.InitGoGitRepo(repoIsaacPath, gitBugNamespace) + defer repoIsaac.Close() _ = repoRene.AddRemote("origin", repoIsaacPath) _ = repoIsaac.AddRemote("origin", repoRenePath) |