@@ -17,7 +17,7 @@ const StorageDir = "storage/"
const IconsDir = StorageDir + "icons/"
const bookmarksFile = "bookmarks.json"
-func init() {
+func NewBookmarkService() {
createFolderStructure()
parseBookmarks()
go watchBookmarks()
@@ -1,6 +1,7 @@
package main
import (
+ "godash/bookmark"
"godash/logging"
"godash/server"
"godash/system"
@@ -9,7 +10,8 @@ import (
func main() {
logging.NewGlobalLogger()
- weather.NewWeather()
- system.NewSystem()
+ weather.NewWeatherService()
+ system.NewSystemService()
+ bookmark.NewBookmarkService()
server.NewServer()
}
@@ -10,7 +10,7 @@ import (
var Config = SystemConfig{}
var Sys = System{}
-func NewSystem() {
+func NewSystemService() {
config.ParseViperConfig(&Config, config.AddViperConfig("system"))
if Config.LiveSystem {
Sys.Initialize()
@@ -14,7 +14,7 @@ import (
var Conf = Config{}
var CurrentWeather = Weather{}
-func NewWeather() {
+func NewWeatherService() {
config.ParseViperConfig(&Conf, config.AddViperConfig("weather"))
if Conf.OpenWeather.Key != "" {
setWeatherUnits()