1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Split up logger and widget

This allows us to use the logger from the wtf directory
For example when trying to debug sort ordering in focus_tracker
This commit is contained in:
Sean Smith
2019-05-10 18:21:52 -04:00
parent 0b59a3b62f
commit c328ba4c11
12 changed files with 131 additions and 117 deletions

View File

@@ -19,7 +19,7 @@ import (
"time"
"github.com/wtfutil/wtf/cfg"
"github.com/wtfutil/wtf/wtf"
"github.com/wtfutil/wtf/utils"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/calendar/v3"
@@ -30,7 +30,7 @@ import (
func (widget *Widget) Fetch() ([]*CalEvent, error) {
ctx := context.Background()
secretPath, _ := wtf.ExpandHomeDir(widget.settings.secretFile)
secretPath, _ := utils.ExpandHomeDir(widget.settings.secretFile)
b, err := ioutil.ReadFile(secretPath)
if err != nil {
@@ -123,7 +123,7 @@ func isAuthenticated() bool {
}
func (widget *Widget) authenticate() {
secretPath, _ := wtf.ExpandHomeDir(widget.settings.secretFile)
secretPath, _ := utils.ExpandHomeDir(widget.settings.secretFile)
b, err := ioutil.ReadFile(secretPath)
if err != nil {