mirror of
https://github.com/taigrr/gico.git
synced 2026-04-01 18:58:59 -07:00
consolidate types
This commit is contained in:
@@ -13,36 +13,41 @@ import (
|
||||
"github.com/taigrr/gico/types"
|
||||
)
|
||||
|
||||
type errMsg error
|
||||
const (
|
||||
settings Cursor = iota
|
||||
graph
|
||||
commitLog
|
||||
)
|
||||
|
||||
type model struct {
|
||||
SettingsModel Settings
|
||||
GraphModel Graph
|
||||
CommitLogModel CommitLog
|
||||
HelpModel help.Model
|
||||
Bindings []key.Binding
|
||||
quitting bool
|
||||
cursor Cursor
|
||||
err error
|
||||
}
|
||||
|
||||
type CommitLog struct {
|
||||
Year int
|
||||
YearDay int
|
||||
Commits [][]types.Commit
|
||||
Selected int
|
||||
Authors []string
|
||||
Repos []string
|
||||
}
|
||||
|
||||
type Settings struct{}
|
||||
|
||||
type Graph struct {
|
||||
Selected int
|
||||
Year int
|
||||
Repos []string
|
||||
Authors []string
|
||||
}
|
||||
type (
|
||||
Cursor int
|
||||
errMsg error
|
||||
model struct {
|
||||
SettingsModel Settings
|
||||
GraphModel Graph
|
||||
CommitLogModel CommitLog
|
||||
HelpModel help.Model
|
||||
Bindings []key.Binding
|
||||
quitting bool
|
||||
cursor Cursor
|
||||
err error
|
||||
}
|
||||
CommitLog struct {
|
||||
Year int
|
||||
YearDay int
|
||||
Commits [][]types.Commit
|
||||
Selected int
|
||||
Authors []string
|
||||
Repos []string
|
||||
}
|
||||
Settings struct{}
|
||||
Graph struct {
|
||||
Selected int
|
||||
Year int
|
||||
Repos []string
|
||||
Authors []string
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
quitKeys = key.NewBinding(
|
||||
@@ -55,14 +60,6 @@ var (
|
||||
)
|
||||
)
|
||||
|
||||
const (
|
||||
settings Cursor = iota
|
||||
graph
|
||||
commitLog
|
||||
)
|
||||
|
||||
type Cursor int
|
||||
|
||||
func initialModel() (model, error) {
|
||||
var m model
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user