consolidate types

This commit is contained in:
2023-02-16 21:23:36 -08:00
parent 011714eb3b
commit 7dc43e18ed

View File

@@ -13,9 +13,16 @@ import (
"github.com/taigrr/gico/types"
)
type errMsg error
const (
settings Cursor = iota
graph
commitLog
)
type model struct {
type (
Cursor int
errMsg error
model struct {
SettingsModel Settings
GraphModel Graph
CommitLogModel CommitLog
@@ -25,8 +32,7 @@ type model struct {
cursor Cursor
err error
}
type CommitLog struct {
CommitLog struct {
Year int
YearDay int
Commits [][]types.Commit
@@ -34,15 +40,14 @@ type CommitLog struct {
Authors []string
Repos []string
}
type Settings struct{}
type Graph struct {
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