aboutsummaryrefslogtreecommitdiffstats
path: root/misc/random_bugs/cmd/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/random_bugs/cmd/main.go')
-rw-r--r--misc/random_bugs/cmd/main.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/misc/random_bugs/cmd/main.go b/misc/random_bugs/cmd/main.go
new file mode 100644
index 00000000..ec62b6ed
--- /dev/null
+++ b/misc/random_bugs/cmd/main.go
@@ -0,0 +1,29 @@
+package main
+
+import (
+ "os"
+
+ "github.com/MichaelMure/git-bug/bug"
+ rb "github.com/MichaelMure/git-bug/misc/random_bugs"
+ "github.com/MichaelMure/git-bug/repository"
+)
+
+// This program will randomly generate a collection of bugs in the repository
+// of the current path
+func main() {
+ dir, err := os.Getwd()
+ if err != nil {
+ panic(err)
+ }
+
+ loaders := []repository.ClockLoader{
+ bug.ClockLoader,
+ }
+
+ repo, err := repository.NewGitRepo(dir, loaders)
+ if err != nil {
+ panic(err)
+ }
+
+ rb.CommitRandomBugs(repo, rb.DefaultOptions())
+}