aboutsummaryrefslogtreecommitdiff
path: root/words.go
diff options
context:
space:
mode:
Diffstat (limited to 'words.go')
-rw-r--r--words.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/words.go b/words.go
new file mode 100644
index 0000000..6cdba0c
--- /dev/null
+++ b/words.go
@@ -0,0 +1,20 @@
+// Copyright 2020, Shulhan <ms@kilabit.info>. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package kamusku
+
+//
+// Words contains list of words.
+//
+type Words map[string]struct{}
+
+//
+// merge other map into current map.
+//
+func (words Words) merge(in Words) Words {
+ for k := range in {
+ words[k] = struct{}{}
+ }
+ return words
+}