lint: removed unused code (deadcode, structcheck, unused)
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
5ca6022d00
commit
c882cf9960
8 changed files with 5 additions and 33 deletions
|
@ -23,7 +23,6 @@ type MessageStore struct {
|
||||||
threads []*types.Thread
|
threads []*types.Thread
|
||||||
|
|
||||||
selectedUid uint32
|
selectedUid uint32
|
||||||
reselect *models.MessageInfo
|
|
||||||
bodyCallbacks map[uint32][]func(*types.FullMessage)
|
bodyCallbacks map[uint32][]func(*types.FullMessage)
|
||||||
headerCallbacks map[uint32][]func(*types.MessageInfo)
|
headerCallbacks map[uint32][]func(*types.MessageInfo)
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ type Bordered struct {
|
||||||
Invalidatable
|
Invalidatable
|
||||||
borders uint
|
borders uint
|
||||||
content Drawable
|
content Drawable
|
||||||
onInvalidate func(d Drawable)
|
|
||||||
uiConfig *config.UIConfig
|
uiConfig *config.UIConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,17 +20,16 @@ type Tabs struct {
|
||||||
|
|
||||||
uiConfig *config.UIConfig
|
uiConfig *config.UIConfig
|
||||||
|
|
||||||
onInvalidateStrip func(d Drawable)
|
onInvalidateStrip func(d Drawable) //nolint:structcheck // used within this file
|
||||||
onInvalidateContent func(d Drawable)
|
onInvalidateContent func(d Drawable)
|
||||||
|
|
||||||
parent *Tabs
|
parent *Tabs //nolint:structcheck // used within this file
|
||||||
CloseTab func(index int)
|
CloseTab func(index int)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Tab struct {
|
type Tab struct {
|
||||||
Content Drawable
|
Content Drawable
|
||||||
Name string
|
Name string
|
||||||
invalid bool
|
|
||||||
pinned bool
|
pinned bool
|
||||||
indexBeforePin int
|
indexBeforePin int
|
||||||
uiConf *config.UIConfig
|
uiConf *config.UIConfig
|
||||||
|
|
|
@ -46,7 +46,6 @@ type AccountWizard struct {
|
||||||
steps []*ui.Grid
|
steps []*ui.Grid
|
||||||
focus int
|
focus int
|
||||||
temporary bool
|
temporary bool
|
||||||
testing bool
|
|
||||||
// CONFIGURE_BASICS
|
// CONFIGURE_BASICS
|
||||||
accountName *ui.TextInput
|
accountName *ui.TextInput
|
||||||
email *ui.TextInput
|
email *ui.TextInput
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package widgets
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"git.sr.ht/~rjarry/aerc/lib"
|
|
||||||
"git.sr.ht/~rjarry/aerc/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
func msgInfoFromUids(store *lib.MessageStore, uids []uint32) ([]*models.MessageInfo, error) {
|
|
||||||
infos := make([]*models.MessageInfo, len(uids))
|
|
||||||
for i, uid := range uids {
|
|
||||||
var ok bool
|
|
||||||
infos[i], ok = store.Messages[uid]
|
|
||||||
if !ok {
|
|
||||||
return nil, fmt.Errorf("uid not found")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return infos, nil
|
|
||||||
}
|
|
|
@ -59,7 +59,6 @@ type DirectoryList struct {
|
||||||
worker *types.Worker
|
worker *types.Worker
|
||||||
skipSelect context.Context
|
skipSelect context.Context
|
||||||
skipSelectCancel context.CancelFunc
|
skipSelectCancel context.CancelFunc
|
||||||
connected bool
|
|
||||||
uiConf map[string]*config.UIConfig
|
uiConf map[string]*config.UIConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ type idler struct {
|
||||||
config imapConfig
|
config imapConfig
|
||||||
client *imapClient
|
client *imapClient
|
||||||
worker *types.Worker
|
worker *types.Worker
|
||||||
last time.Time
|
|
||||||
stop chan struct{}
|
stop chan struct{}
|
||||||
done chan error
|
done chan error
|
||||||
waiting bool
|
waiting bool
|
||||||
|
|
|
@ -17,7 +17,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.sr.ht/~rjarry/aerc/config"
|
"git.sr.ht/~rjarry/aerc/config"
|
||||||
"git.sr.ht/~rjarry/aerc/lib/uidstore"
|
|
||||||
"git.sr.ht/~rjarry/aerc/logging"
|
"git.sr.ht/~rjarry/aerc/logging"
|
||||||
"git.sr.ht/~rjarry/aerc/models"
|
"git.sr.ht/~rjarry/aerc/models"
|
||||||
"git.sr.ht/~rjarry/aerc/worker/handlers"
|
"git.sr.ht/~rjarry/aerc/worker/handlers"
|
||||||
|
@ -40,7 +39,6 @@ type worker struct {
|
||||||
nmEvents chan eventType
|
nmEvents chan eventType
|
||||||
query string
|
query string
|
||||||
currentQueryName string
|
currentQueryName string
|
||||||
uidStore *uidstore.Store
|
|
||||||
queryMapOrder []string
|
queryMapOrder []string
|
||||||
nameQueryMap map[string]string
|
nameQueryMap map[string]string
|
||||||
db *notmuch.DB
|
db *notmuch.DB
|
||||||
|
|
Loading…
Reference in a new issue