From 6fce71778e8d1f5914d6f285c74afd561f75967e Mon Sep 17 00:00:00 2001 From: Jan Hensel Date: Tue, 2 Jul 2024 00:56:30 +0200 Subject: [PATCH] style: Fix a bunch of typos --- internal/control/cli/controller.go | 4 ++-- internal/control/edit/editors/composite_editor.go | 2 -- internal/input/processor.go | 2 +- internal/input/processors/modal_input_processor.go | 2 +- internal/input/processors/text_input_processor.go | 2 +- internal/input/tree.go | 2 +- internal/model/backlog.go | 2 +- internal/ui/panes/composite.go | 2 +- internal/ui/panes/help_pane.go | 3 ++- internal/ui/position_info.go | 2 +- 10 files changed, 11 insertions(+), 12 deletions(-) diff --git a/internal/control/cli/controller.go b/internal/control/cli/controller.go index f562d4d7..5675e26b 100644 --- a/internal/control/cli/controller.go +++ b/internal/control/cli/controller.go @@ -177,7 +177,7 @@ func NewController( editorHeight := 20 scrollableZoomableInputMap := map[input.Keyspec]action.Action{ - "": action.NewSimple(func() string { return "scoll up" }, func() { controller.ScrollUp(10) }), + "": action.NewSimple(func() string { return "scroll up" }, func() { controller.ScrollUp(10) }), "": action.NewSimple(func() string { return "scroll down" }, func() { controller.ScrollDown(10) }), "gg": action.NewSimple(func() string { return "scroll to top" }, controller.ScrollTop), "G": action.NewSimple(func() string { return "scroll to bottom" }, controller.ScrollBottom), @@ -665,7 +665,7 @@ func NewController( log.Error().Err(err).Msg("unable to write backlog to writer") return } - log.Info().Msgf("wrote backlog to '%s' sucessfully", backlogFilePath) + log.Info().Msgf("wrote backlog to '%s' successfully", backlogFilePath) }), }, ) diff --git a/internal/control/edit/editors/composite_editor.go b/internal/control/edit/editors/composite_editor.go index 113b2b7e..65b4d6ad 100644 --- a/internal/control/edit/editors/composite_editor.go +++ b/internal/control/edit/editors/composite_editor.go @@ -309,8 +309,6 @@ func (e *Composite) GetActiveFieldID() EditorID { return e.activeFieldID } func (e *Composite) IsInField() bool { return e.inField } // GetFields returns the subeditors of this composite editor. -// -// TOOD: should this exist / be public (what is it good for)? func (e *Composite) GetFields() map[EditorID]edit.Editor { return e.fields } diff --git a/internal/input/processor.go b/internal/input/processor.go index 59012118..2af1eef3 100644 --- a/internal/input/processor.go +++ b/internal/input/processor.go @@ -7,7 +7,7 @@ type SimpleInputProcessor interface { // CapturesInput returns whether this processor "captures" input, i.E. whether // it ought to take priority in processing over other processors. - // This is useful, e.g., for prioritizing processors whith partial input + // This is useful, e.g., for prioritizing processors with partial input // sequences or for such overlays, that are to take complete priority by // completely gobbling all input. CapturesInput() bool diff --git a/internal/input/processors/modal_input_processor.go b/internal/input/processors/modal_input_processor.go index f148b45a..3aaeff50 100644 --- a/internal/input/processors/modal_input_processor.go +++ b/internal/input/processors/modal_input_processor.go @@ -27,7 +27,7 @@ func NewModalInputProcessor(base input.SimpleInputProcessor) *ModalInputProcesso // CapturesInput returns whether this processor "captures" input, i.E. whether // it ought to take priority in processing over other processors. -// This is useful, e.g., for prioritizing processors whith partial input +// This is useful, e.g., for prioritizing processors with partial input // sequences or for such overlays, that are to take complete priority by // completely gobbling all input. func (p *ModalInputProcessor) CapturesInput() bool { diff --git a/internal/input/processors/text_input_processor.go b/internal/input/processors/text_input_processor.go index d7130af9..3fa8036f 100644 --- a/internal/input/processors/text_input_processor.go +++ b/internal/input/processors/text_input_processor.go @@ -40,7 +40,7 @@ func (p *TextInputProcessor) ProcessInput(key input.Key) bool { // CapturesInput returns whether this processor "captures" input, i.E. whether // it ought to take priority in processing over other processors. -// This is useful, e.g., for prioritizing processors whith partial input +// This is useful, e.g., for prioritizing processors with partial input // sequences or for such overlays, that are to take complete priority by // completely gobbling all input. func (p *TextInputProcessor) CapturesInput() bool { diff --git a/internal/input/tree.go b/internal/input/tree.go index 78a2b312..321ad903 100644 --- a/internal/input/tree.go +++ b/internal/input/tree.go @@ -44,7 +44,7 @@ func (t *Tree) ProcessInput(k Key) (applied bool) { // CapturesInput returns whether this processor "captures" input, i.E. whether // it ought to take priority in processing over other processors. -// This is useful, e.g., for prioritizing processors whith partial input +// This is useful, e.g., for prioritizing processors with partial input // sequences or for such overlays, that are to take complete priority by // completely gobbling all input. func (t *Tree) CapturesInput() bool { diff --git a/internal/model/backlog.go b/internal/model/backlog.go index a880a24d..7f147800 100644 --- a/internal/model/backlog.go +++ b/internal/model/backlog.go @@ -82,7 +82,7 @@ func (b *Backlog) Write(w io.Writer) error { data, err := yaml.Marshal(toBeWritten) if err != nil { - return fmt.Errorf("unabel to marshal backlog (%s)", err.Error()) + return fmt.Errorf("unable to marshal backlog (%s)", err.Error()) } _, err = w.Write(data) if err != nil { diff --git a/internal/ui/panes/composite.go b/internal/ui/panes/composite.go index 3c71f663..3247ed9b 100644 --- a/internal/ui/panes/composite.go +++ b/internal/ui/panes/composite.go @@ -9,7 +9,7 @@ import ( "github.com/ja-he/dayplan/internal/util" ) -// Composite is a generic wrapper pane whithout any rendering logic of its +// Composite is a generic wrapper pane without any rendering logic of its // own. type Composite struct { ui.BasePane diff --git a/internal/ui/panes/help_pane.go b/internal/ui/panes/help_pane.go index f269fbc0..1733f445 100644 --- a/internal/ui/panes/help_pane.go +++ b/internal/ui/panes/help_pane.go @@ -8,7 +8,8 @@ import ( "github.com/ja-he/dayplan/internal/ui" ) -// HelpPane conditionally be hidden or display a set of keyboad shortcuts. +// A HelpPane is a pane that displays a help popup. +// For example, it could display a list of key mappings and their actions. type HelpPane struct { ui.LeafPane diff --git a/internal/ui/position_info.go b/internal/ui/position_info.go index 9ead78de..4788e3e6 100644 --- a/internal/ui/position_info.go +++ b/internal/ui/position_info.go @@ -7,7 +7,7 @@ import ( // PositionInfo describes a position in the user interface. // // Retrievers should initially check for the type of pane they are receiving -// information on and can then retreive the relevant additional information from +// information on and can then retrieve the relevant additional information from // whatever they got. type PositionInfo interface{}