mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-01-09 06:21:12 +08:00
appease linter
This commit is contained in:
parent
e68554cee9
commit
052c2ec1d1
3
go.mod
3
go.mod
@ -7,7 +7,6 @@ require (
|
||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
|
||||
github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1
|
||||
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/docker/docker v0.7.3-0.20190307005417-54dddadc7d5d
|
||||
github.com/fatih/color v1.7.0
|
||||
github.com/go-errors/errors v1.0.1
|
||||
@ -29,6 +28,7 @@ require (
|
||||
require (
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
|
||||
github.com/Microsoft/go-winio v0.4.14 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
@ -50,6 +50,7 @@ require (
|
||||
golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
|
||||
google.golang.org/grpc v1.22.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2 // indirect
|
||||
|
||||
3
go.sum
3
go.sum
@ -123,8 +123,9 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
||||
2
main.go
2
main.go
@ -97,7 +97,7 @@ func main() {
|
||||
stackTrace := newErr.ErrorStack()
|
||||
app.Log.Error(stackTrace)
|
||||
|
||||
log.Fatal(fmt.Sprintf("%s\n\n%s", app.Tr.ErrorOccurred, stackTrace))
|
||||
log.Fatalf("%s\n\n%s", app.Tr.ErrorOccurred, stackTrace)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -242,7 +242,6 @@ func (gui *Gui) renderContainerLogsAux(container *commands.Container, stop, noti
|
||||
gui.Log.Warn(err)
|
||||
}
|
||||
gui.Log.Info("killed container logs process")
|
||||
return
|
||||
}()
|
||||
|
||||
_ = cmd.Wait()
|
||||
@ -411,7 +410,6 @@ type removeContainerOption struct {
|
||||
description string
|
||||
command string
|
||||
configOptions types.ContainerRemoveOptions
|
||||
runCommand bool
|
||||
}
|
||||
|
||||
// GetDisplayStrings is a function.
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package gui
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-errors/errors"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
@ -73,5 +71,5 @@ func (gui *Gui) handleCreateOptionsMenu(g *gocui.Gui, v *gocui.View) error {
|
||||
return bindings[index].Handler(g, v)
|
||||
}
|
||||
|
||||
return gui.createMenu(strings.Title(gui.Tr.Menu), bindings, len(bindings), handleMenuPress)
|
||||
return gui.createMenu(gui.Tr.MenuTitle, bindings, len(bindings), handleMenuPress)
|
||||
}
|
||||
|
||||
@ -126,11 +126,6 @@ func (gui *Gui) renderServiceTop(service *commands.Service) error {
|
||||
}
|
||||
|
||||
func (gui *Gui) renderServiceLogs(service *commands.Service) error {
|
||||
service, err := gui.getSelectedService()
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if service.Container == nil {
|
||||
return gui.T.NewTask(func(stop chan struct{}) {
|
||||
gui.clearMainView()
|
||||
|
||||
@ -199,7 +199,6 @@ func (gui *Gui) focusPoint(selectedX int, selectedY int, lineCount int, v *gocui
|
||||
if originalCy != cy {
|
||||
_ = v.SetCursor(cx, selectedY-oy)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (gui *Gui) cleanString(s string) string {
|
||||
|
||||
@ -26,6 +26,7 @@ func dutchSet() TranslationSet {
|
||||
Execute: "voer uit",
|
||||
Close: "sluit",
|
||||
Menu: "menu",
|
||||
MenuTitle: "Menu",
|
||||
Scroll: "scroll",
|
||||
OpenConfig: "open de lazydocker configuratie",
|
||||
EditConfig: "verander de lazydocker configuratie",
|
||||
|
||||
@ -8,6 +8,7 @@ type TranslationSet struct {
|
||||
GlobalTitle string
|
||||
Navigate string
|
||||
Menu string
|
||||
MenuTitle string
|
||||
Execute string
|
||||
Scroll string
|
||||
Close string
|
||||
@ -127,6 +128,7 @@ func englishSet() TranslationSet {
|
||||
Execute: "execute",
|
||||
Close: "close",
|
||||
Menu: "menu",
|
||||
MenuTitle: "Menu",
|
||||
Scroll: "scroll",
|
||||
OpenConfig: "open lazydocker config",
|
||||
EditConfig: "edit lazydocker config",
|
||||
|
||||
@ -25,7 +25,8 @@ func germanSet() TranslationSet {
|
||||
Navigate: "navigieren",
|
||||
Execute: "ausführen",
|
||||
Close: "schließen",
|
||||
Menu: "Menü",
|
||||
Menu: "menü",
|
||||
MenuTitle: "Menü",
|
||||
Scroll: "scrollen",
|
||||
OpenConfig: "öffne lazydocker Konfiguration",
|
||||
EditConfig: "bearbeite lazydocker Konfiguration",
|
||||
|
||||
@ -12,9 +12,8 @@ import (
|
||||
|
||||
// Localizer will translate a message into the user's language
|
||||
type Localizer struct {
|
||||
language string
|
||||
Log *logrus.Entry
|
||||
S TranslationSet
|
||||
Log *logrus.Entry
|
||||
S TranslationSet
|
||||
}
|
||||
|
||||
func NewTranslationSetFromConfig(log *logrus.Entry, configLanguage string) (*TranslationSet, error) {
|
||||
|
||||
@ -26,6 +26,7 @@ func polishSet() TranslationSet {
|
||||
Execute: "wykonaj",
|
||||
Close: "zamknij",
|
||||
Menu: "menu",
|
||||
MenuTitle: "Menu",
|
||||
Scroll: "przewiń",
|
||||
OpenConfig: "otwórz konfigurację",
|
||||
EditConfig: "edytuj konfigurację",
|
||||
|
||||
@ -26,6 +26,7 @@ func turkishSet() TranslationSet {
|
||||
Execute: "çalıştır",
|
||||
Close: "kapat",
|
||||
Menu: "menü",
|
||||
MenuTitle: "Menü",
|
||||
Scroll: "kaydır",
|
||||
OpenConfig: "lazydocker ayarlarını aç",
|
||||
EditConfig: "lazzydocker ayarlarını düzenle",
|
||||
|
||||
@ -10,14 +10,12 @@ import (
|
||||
)
|
||||
|
||||
type TaskManager struct {
|
||||
waitingTask *Task
|
||||
currentTask *Task
|
||||
waitingMutex sync.Mutex
|
||||
taskIDMutex sync.Mutex
|
||||
Log *logrus.Entry
|
||||
Tr *i18n.TranslationSet
|
||||
waitingTaskAlerts chan struct{}
|
||||
newTaskId int
|
||||
currentTask *Task
|
||||
waitingMutex sync.Mutex
|
||||
taskIDMutex sync.Mutex
|
||||
Log *logrus.Entry
|
||||
Tr *i18n.TranslationSet
|
||||
newTaskId int
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
@ -104,7 +102,6 @@ func (t *Task) Stop() {
|
||||
<-t.notifyStopped
|
||||
t.Log.Info("received notifystopped message")
|
||||
t.stopped = true
|
||||
return
|
||||
}
|
||||
|
||||
// NewTickerTask is a convenience function for making a new task that repeats some action once per e.g. second
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
package main
|
||||
|
||||
import "log"
|
||||
|
||||
func main() {
|
||||
c := make(chan struct{})
|
||||
|
||||
close(c)
|
||||
|
||||
close(c)
|
||||
|
||||
select {
|
||||
case <-c:
|
||||
log.Println("hmm")
|
||||
}
|
||||
|
||||
select {
|
||||
case <-c:
|
||||
log.Println("okay")
|
||||
}
|
||||
}
|
||||
11
vendor/github.com/docker/go-units/circle.yml
generated
vendored
Normal file
11
vendor/github.com/docker/go-units/circle.yml
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
dependencies:
|
||||
post:
|
||||
# install golint
|
||||
- go get golang.org/x/lint/golint
|
||||
|
||||
test:
|
||||
pre:
|
||||
# run analysis before tests
|
||||
- go vet ./...
|
||||
- test -z "$(golint ./... | tee /dev/stderr)"
|
||||
- test -z "$(gofmt -s -l . | tee /dev/stderr)"
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -146,6 +146,8 @@ golang.org/x/net/proxy
|
||||
golang.org/x/sys/internal/unsafeheader
|
||||
golang.org/x/sys/unix
|
||||
golang.org/x/sys/windows
|
||||
# golang.org/x/text v0.3.7
|
||||
## explicit; go 1.17
|
||||
# golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
|
||||
## explicit
|
||||
# golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user