From b806899521c212cf75f5e99844c9631a23dba71f Mon Sep 17 00:00:00 2001 From: Julio Lira Date: Sat, 28 Mar 2020 15:12:28 -0300 Subject: [PATCH] :tada: Make combine and mess function for combinate word --- main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/main.go b/main.go index aa47f86..a4a3d01 100644 --- a/main.go +++ b/main.go @@ -79,6 +79,22 @@ func inverter(word string) string { } return string(runes) } +func mess(word string, all_list []string) []string { + list := []string {} + for _, i := range all_list { + list = append(list, word + i) + } + return list +} +func combine(all_list []string) []string { + final_words := []string {} + + for _, i := range all_list { + final_words = append(final_words, mess(i, all_list)...) + } + + return final_words +} func main() { final_content := []string {} @@ -89,6 +105,8 @@ func main() { // Running functions for make wordlist for _, word := range content { + final_content = content + final_content = append(final_content, combine(content)...) final_content = append(final_content, leet(word)) final_content = append(final_content, count1(word)) final_content = append(final_content, count2(word))