-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
32 lines (27 loc) · 837 Bytes
/
main.go
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
package main
import (
"./sparkey"
"fmt"
)
func main() {
// TODO add cmd-line flags here
// TEMP example code
// s := sparkey.New("sparkey_db", sparkey.COMPRESSION_NONE, 1024)
// s.Put("first", "Hello")
// s.Put("second", "Worlb")
// s.Put("third", "Goodbye")
// s.Put("fourth", "EOM")
// s.Delete("third")
// s.Flush()
// s.PrettyPrintHash();
// s.Get("first")
// fmt.Printf("Sparkey info:\n\n")
// fmt.Printf(" Basename:\t\t%s\n", s.Basename)
// fmt.Printf(" CompressionType:\t\t%d\n", s.CompressionType)
// fmt.Printf(" Size:\t\t%d\n", s.Size())
// fmt.Printf(" LogWriter.CompressionType:\t\t%d\n", s.CompressionType)
// fmt.Printf(" LogWriter.BlockSize:\t\t%d\n", s.BlockSize)
// fmt.Printf(" MaxKeyLen:\t\t%d\n", s.MaxKeyLen())
// fmt.Printf(" MaxValueLen:\t\t%d\n", s.MaxValueLen())
// s.Close()
}