From 480064f73d84cb7605d9e9dfa2d4d6be51fa67dc Mon Sep 17 00:00:00 2001 From: eson Date: Mon, 28 Sep 2020 17:22:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E9=80=A0=E7=9A=84=E5=BC=80=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- key_test.go | 14 ++++++++++++++ main.go | 11 +++++++++++ 2 files changed, 25 insertions(+) create mode 100644 key_test.go create mode 100644 main.go diff --git a/key_test.go b/key_test.go new file mode 100644 index 0000000..51605cf --- /dev/null +++ b/key_test.go @@ -0,0 +1,14 @@ +package main + +import "testing" + +func Compare(n1, n2 *Node) int { + vlen := len(n1.Keys) + for i := 0; i < vlen; i++ { + + } + return 0 +} +func TestKey(t *testing.T) { + +} diff --git a/main.go b/main.go new file mode 100644 index 0000000..07159f3 --- /dev/null +++ b/main.go @@ -0,0 +1,11 @@ +package main + +// Key 使用的Key类型, 便于函数处理的归类 +type Key []byte + +// Node 节点 +type Node struct { + Hash uint64 + Keys []*Key + Value interface{} +}