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

Move the utils.go file into the /utils directory

This commit is contained in:
Chris Cummer
2019-08-05 10:50:12 -07:00
parent 0bd2d176d8
commit 4e46fff145
57 changed files with 190 additions and 188 deletions

View File

@@ -19,7 +19,6 @@ import (
"strings"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/wtf"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
sheets "google.golang.org/api/sheets/v4"
@@ -52,7 +51,7 @@ func (widget *Widget) Fetch() ([]*sheets.ValueRange, error) {
return nil, err
}
cells := wtf.ToStrs(widget.settings.cellAddresses)
cells := utils.ToStrs(widget.settings.cellAddresses)
addresses := strings.Join(cells[:], ";")
responses := make([]*sheets.ValueRange, len(cells))

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"github.com/rivo/tview"
"github.com/wtfutil/wtf/utils"
"github.com/wtfutil/wtf/view"
"github.com/wtfutil/wtf/wtf"
sheets "google.golang.org/api/sheets/v4"
)
@@ -42,7 +42,7 @@ func (widget *Widget) contentFrom(valueRanges []*sheets.ValueRange) string {
res := ""
cells := wtf.ToStrs(widget.settings.cellNames)
cells := utils.ToStrs(widget.settings.cellNames)
for i := 0; i < len(valueRanges); i++ {
res += fmt.Sprintf("%s\t[%s]%s\n", cells[i], widget.settings.colors.values, valueRanges[i].Values[0][0])
}