-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhelp.go
74 lines (72 loc) · 1.96 KB
/
help.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package main
import (
"strings"
)
var CmdHelp = map[string][2]string{
"del": [2]string{
"[bucket ...] bucket/key",
strings.Join([]string{
"Deletes the key in the specified bucket, and returns true.",
"If no key is given, deletes the bucket, and return true.",
"If the bucket/key does not exists, returns false.",
}, "\n"),
},
"delglob": [2]string{
"[bucket ...] bucket/key-pattern",
strings.Join([]string{
"Deletes the buckets/keys matching the given glob pattern, and returns the number of items deleted.",
"If bucket does not exist, returns 0",
}, "\n"),
},
"exists": [2]string{
"[bucket ...] bucket/key",
strings.Join([]string{
"Checks if a given bucket/key exists.",
"Returns true if it does, otherwise false.",
}, "\n"),
},
"get": [2]string{
"[bucket ...] bucket key",
strings.Join([]string{
"Returns the value of the given key in the specified bucket.",
"Returns an empty string if the bucket or key does not exist.",
}, "\n"),
},
"help": [2]string{
"command",
strings.Join([]string{
"Shows the help output for the given command.",
}, "\n"),
},
"set": [2]string{
"[bucket ...] bucket key value",
strings.Join([]string{
"Sets the value of the given key in the specified bucket, and returns true.",
"If the bucket does not exist it will be created.",
}, "\n"),
},
"buckets": [2]string{
"[bucket ...] bucket-pattern",
strings.Join([]string{
"Lists all buckets matching the given glob pattern.",
}, "\n"),
},
"keys": [2]string{
"[bucket ...] bucket key-pattern",
strings.Join([]string{
"Lists all keys in the specified bucket matching the given glob pattern.",
}, "\n"),
},
"keyvalues": [2]string{
"[bucket ...] bucket key-pattern",
strings.Join([]string{
"Lists all keys and their associated values in the specified bucket matching the given glob pattern.",
}, "\n"),
},
"stats": [2]string{
"",
strings.Join([]string{
"Returns the result of bolt.DB.Stats()",
}, "\n"),
},
}