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:
Moritz Poldrack 2022-07-30 13:29:46 +02:00 committed by Robin Jarry
parent 5ca6022d00
commit c882cf9960
8 changed files with 5 additions and 33 deletions

View file

@ -23,7 +23,6 @@ type MessageStore struct {
threads []*types.Thread
selectedUid uint32
reselect *models.MessageInfo
bodyCallbacks map[uint32][]func(*types.FullMessage)
headerCallbacks map[uint32][]func(*types.MessageInfo)

View file

@ -15,10 +15,9 @@ const (
type Bordered struct {
Invalidatable
borders uint
content Drawable
onInvalidate func(d Drawable)
uiConfig *config.UIConfig
borders uint
content Drawable
uiConfig *config.UIConfig
}
func NewBordered(

View file

@ -20,17 +20,16 @@ type Tabs struct {
uiConfig *config.UIConfig
onInvalidateStrip func(d Drawable)
onInvalidateStrip func(d Drawable) //nolint:structcheck // used within this file
onInvalidateContent func(d Drawable)
parent *Tabs
parent *Tabs //nolint:structcheck // used within this file
CloseTab func(index int)
}
type Tab struct {
Content Drawable
Name string
invalid bool
pinned bool
indexBeforePin int
uiConf *config.UIConfig

View file

@ -46,7 +46,6 @@ type AccountWizard struct {
steps []*ui.Grid
focus int
temporary bool
testing bool
// CONFIGURE_BASICS
accountName *ui.TextInput
email *ui.TextInput

View file

@ -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
}

View file

@ -59,7 +59,6 @@ type DirectoryList struct {
worker *types.Worker
skipSelect context.Context
skipSelectCancel context.CancelFunc
connected bool
uiConf map[string]*config.UIConfig
}

View file

@ -25,7 +25,6 @@ type idler struct {
config imapConfig
client *imapClient
worker *types.Worker
last time.Time
stop chan struct{}
done chan error
waiting bool

View file

@ -17,7 +17,6 @@ import (
"time"
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib/uidstore"
"git.sr.ht/~rjarry/aerc/logging"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/worker/handlers"
@ -40,7 +39,6 @@ type worker struct {
nmEvents chan eventType
query string
currentQueryName string
uidStore *uidstore.Store
queryMapOrder []string
nameQueryMap map[string]string
db *notmuch.DB