Start bookmark-service in main
This commit is contained in:
parent
b3bf334bae
commit
c53770f9c9
4 changed files with 7 additions and 5 deletions
|
@ -17,7 +17,7 @@ const StorageDir = "storage/"
|
|||
const IconsDir = StorageDir + "icons/"
|
||||
const bookmarksFile = "bookmarks.json"
|
||||
|
||||
func init() {
|
||||
func NewBookmarkService() {
|
||||
createFolderStructure()
|
||||
parseBookmarks()
|
||||
go watchBookmarks()
|
||||
|
|
6
main.go
6
main.go
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue