aboutsummaryrefslogtreecommitdiff
path: root/cmd/bolt/main.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2015-01-08 15:03:43 -0700
committerBen Johnson <benbjohnson@yahoo.com>2015-01-08 15:03:55 -0700
commitea7ace2f62a387cafbaa5b839753305315076208 (patch)
tree5a9125cfe35c7c2e571a86d99ef0842c806ad225 /cmd/bolt/main.go
parentREADME (diff)
downloaddedo-ea7ace2f62a387cafbaa5b839753305315076208.tar.gz
dedo-ea7ace2f62a387cafbaa5b839753305315076208.tar.xz
Remove 'import' and 'export' CLI commands.
The import and export commands are a relic of early Bolt when the file format was not stable. If the file format changed then users could export their old data and import it into a new database with a new format. The Bolt DB file format is stable and will not change so this command is no longer needed. Thanks to Alejandro Gaviria for pointing this out.
Diffstat (limited to 'cmd/bolt/main.go')
-rw-r--r--cmd/bolt/main.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/cmd/bolt/main.go b/cmd/bolt/main.go
index 95bd813..183d1f2 100644
--- a/cmd/bolt/main.go
+++ b/cmd/bolt/main.go
@@ -2,7 +2,6 @@ package main
import (
"bytes"
- "encoding/json"
"fmt"
"log"
"os"
@@ -10,13 +9,11 @@ import (
"github.com/boltdb/bolt"
"github.com/codegangsta/cli"
- // "github.com/davecheney/profile"
)
var branch, commit string
func main() {
- // defer profile.Start(&profile.Config{CPUProfile: true, MemProfile: true}).Stop()
log.SetFlags(0)
NewApp().Run(os.Args)
}
@@ -61,24 +58,6 @@ func NewApp() *cli.App {
},
},
{
- Name: "import",
- Usage: "Imports from a JSON dump into a database",
- Flags: []cli.Flag{
- &cli.StringFlag{Name: "input"},
- },
- Action: func(c *cli.Context) {
- Import(c.Args().Get(0), c.String("input"))
- },
- },
- {
- Name: "export",
- Usage: "Exports a database to JSON",
- Action: func(c *cli.Context) {
- path := c.Args().Get(0)
- Export(path)
- },
- },
- {
Name: "pages",
Usage: "Dumps page information for a database",
Action: func(c *cli.Context) {
@@ -217,10 +196,3 @@ func SetTestMode(value bool) {
logger = log.New(os.Stderr, "", 0)
}
}
-
-// rawMessage represents a JSON element in the import/export document.
-type rawMessage struct {
- Type string `json:"type,omitempty"`
- Key []byte `json:"key"`
- Value json.RawMessage `json:"value"`
-}