File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ Displays all content of the database limited by "LIMIT".
121121 * ` geohash ` - Attempts to convert the data format of the ` geohash ` in the coordinates of the center (lat, lng)
122122 * ` int64 ` - Attempts to display the data as an integer 64-bit number
123123 * ` float64 ` - Attempts to display the data as a 64-bit number c with a floating point
124+ * ` hex ` - Converts raw data to a hexademical
124125
125126### help
126127> help
Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ package cliutil
88
99import (
1010 "encoding/binary"
11+ "encoding/hex"
1112 "fmt"
13+ "math"
14+
1215 "github.com/TomiHiltunen/geohash-golang"
1316 "gopkg.in/mgo.v2/bson"
14- "math"
1517)
1618
1719// Converts data to a string
@@ -26,6 +28,8 @@ func ToString(format string, value []byte) string {
2628 case "float64" :
2729 return float64ToString (value )
2830 case "raw" :
31+ case "hex" :
32+ return hex .EncodeToString (value )
2933 default :
3034 }
3135
You can’t perform that action at this time.
0 commit comments