mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix issues found by goimports
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
package buildkite
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"os"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -2,6 +2,7 @@ package buildkite
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
)
|
||||
|
||||
@@ -12,10 +12,9 @@ import (
|
||||
|
||||
const (
|
||||
pullRequestsPath = "/pulls"
|
||||
issuesPath = "/issues"
|
||||
issuesPath = "/issues"
|
||||
)
|
||||
|
||||
|
||||
// GithubRepo defines a new GithubRepo structure
|
||||
type GithubRepo struct {
|
||||
apiKey string
|
||||
|
||||
@@ -45,7 +45,7 @@ func (widget *Widget) Create(jenkinsURL string, username string, apiKey string)
|
||||
return view, err
|
||||
}
|
||||
|
||||
respJobs := make([]Job, 0, len(view.Jobs) + len(view.ActiveConfigurations))
|
||||
respJobs := make([]Job, 0, len(view.Jobs)+len(view.ActiveConfigurations))
|
||||
respJobs = append(append(respJobs, view.Jobs...), view.ActiveConfigurations...)
|
||||
|
||||
jobs := make([]Job, 0)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package jenkins
|
||||
|
||||
type View struct {
|
||||
Description string `json:"description"`
|
||||
Jobs []Job `json:"jobs"`
|
||||
ActiveConfigurations []Job `json:"activeConfigurations"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
Description string `json:"description"`
|
||||
Jobs []Job `json:"jobs"`
|
||||
ActiveConfigurations []Job `json:"activeConfigurations"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
@@ -2,10 +2,11 @@ package jenkins
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ type Issue struct {
|
||||
type IssueFields struct {
|
||||
Summary string `json:"summary"`
|
||||
|
||||
IssueType *IssueType `json:"issuetype"`
|
||||
IssueType *IssueType `json:"issuetype"`
|
||||
IssueStatus *IssueStatus `json:"status"`
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ type IssueType struct {
|
||||
}
|
||||
|
||||
type IssueStatus struct {
|
||||
ISelf string `json:"self"`
|
||||
IDescription string `json:"description"`
|
||||
IName string `json:"name"`
|
||||
ISelf string `json:"self"`
|
||||
IDescription string `json:"description"`
|
||||
IName string `json:"name"`
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package spacex
|
||||
|
||||
import (
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -44,16 +44,16 @@ func (widget *Widget) Refresh() {
|
||||
widget.links = nil
|
||||
widget.SetItemCount(0)
|
||||
} else {
|
||||
if len(links) <= widget.settings.numberOfPosts {
|
||||
widget.links = links
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
} else {
|
||||
widget.links = links[:widget.settings.numberOfPosts]
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
}
|
||||
}
|
||||
if len(links) <= widget.settings.numberOfPosts {
|
||||
widget.links = links
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
} else {
|
||||
widget.links = links[:widget.settings.numberOfPosts]
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
}
|
||||
}
|
||||
widget.Render()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package twitch
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nicklaw5/helix"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package twitch
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nicklaw5/helix"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
|
||||
@@ -2,6 +2,7 @@ package arpansagovau
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user