commit 480064f73d84cb7605d9e9dfa2d4d6be51fa67dc Author: eson Date: Mon Sep 28 17:22:43 2020 +0800 创造的开始 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{} +}