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:
@@ -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))
|
||||
|
||||
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user