summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cmd/grus/grus.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/grus/grus.go b/cmd/grus/grus.go
index a68db97..2e04de8 100644
--- a/cmd/grus/grus.go
+++ b/cmd/grus/grus.go
@@ -47,12 +47,14 @@ func grus() {
 	word := os.Args[1]
 	sorted := lexical.Sort(word)
 
-	out, err := search.Word(sorted, db)
+	anagrams, err := search.Anagrams(sorted, db)
 	if err == sql.ErrNoRows {
 		fmt.Println("Word not found in database.")
 		return
 	} else if err != nil {
 		log.Fatalf("grus: Search failed :: %s", err)
 	}
-	fmt.Println(out)
+	for _, w := range anagrams {
+		fmt.Println(w)
+	}
 }
e>
6152ef13 ^
ac0e9db5 ^
2fb94e3c ^
37e4573b ^


05d17773 ^
37e4573b ^


3ba63579 ^




2fb94e3c ^
3ba63579 ^

ac0e9db5 ^
05d17773 ^
ac0e9db5 ^
05d17773 ^
3ba63579 ^
ac0e9db5 ^
05d17773 ^
3ba63579 ^





9cc16d04 ^
0f125d5f ^

37e4573b ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52