@@ -46,18 +46,18 @@ var rootCmd = &cobra.Command{
4646fmt .Printf (logo ,version .Tag ,version .Commit ,version .Date ,runtime .Version ())
4747}
4848
49- storage .Initialize ()
49+ storage .Initialize (viper . GetString ( "dir" ), viper . GetString ( "data" ), viper . GetString ( "conf" ) )
5050
51- initConfig (storage .ConfigPath .Config (),viper .GetBool ("reset-config" ))
51+ initConfig (storage .Path .Config (),viper .GetBool ("reset-config" ))
5252},
5353
5454Run :func (cmd * cobra.Command ,args []string ) {
5555if viper .GetBool ("dev" ) {
5656log .Println ("Running in development mode, access client at http://localhost:3000" )
5757}
58- log .Println ("Storing data at" ,storage .DataPath . Root ())
58+ log .Println ("Storing data at" ,storage .Path . DataRoot ())
5959
60- db ,err := boltdb .New (storage .DataPath .Database ())
60+ db ,err := boltdb .New (storage .Path .Database ())
6161if err != nil {
6262log .Fatal (err )
6363}
@@ -77,11 +77,11 @@ var rootCmd = &cobra.Command{
7777dispatch .SessionStore = db
7878
7979dispatch .GetMessageStore = func (user * storage.User ) (storage.MessageStore ,error ) {
80- return boltdb .New (storage .DataPath .Log (user .Username ))
80+ return boltdb .New (storage .Path .Log (user .Username ))
8181}
8282
8383dispatch .GetMessageSearchProvider = func (user * storage.User ) (storage.MessageSearchProvider ,error ) {
84- return bleve .New (storage .DataPath .Index (user .Username ))
84+ return bleve .New (storage .Path .Index (user .Username ))
8585}
8686
8787dispatch .Run ()