Add cobra, move the server code into its own package

This commit is contained in:
khlieng 2015-05-01 22:59:46 +02:00
parent bb729a5c8e
commit e63c012aad
57 changed files with 6910 additions and 145 deletions

View file

@ -7,8 +7,6 @@ import (
"path"
"github.com/khlieng/name_pending/Godeps/_workspace/src/github.com/boltdb/bolt"
"github.com/khlieng/name_pending/args"
)
var (
@ -22,12 +20,12 @@ var (
bucketMessages = []byte("Messages")
)
func init() {
func Initialize(clean bool) {
var err error
currentUser, _ := user.Current()
appDir = path.Join(currentUser.HomeDir, ".name_pending")
if args.Development {
if clean {
os.RemoveAll(appDir)
}