From 6cdb658d43900e58b126b2afced37b00fc1afe5f Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 7 Apr 2021 13:10:40 -0400 Subject: [PATCH] Simplify package paths --- {internal/editor => editor}/document/document.go | 2 +- {internal/editor => editor}/document/document_test.go | 0 {internal/editor => editor}/document/row.go | 4 ++-- {internal/editor => editor}/document/row_test.go | 0 {internal/editor => editor}/draw.go | 6 +++--- {internal/editor => editor}/editor.go | 8 ++++---- {internal/editor => editor}/editor_test.go | 0 {internal/editor => editor}/highlight/constants.go | 0 {internal/editor => editor}/highlight/fn.go | 2 +- {internal/editor => editor}/input.go | 8 ++++---- {internal/editor => editor}/input_test.go | 4 ++-- gilo.go | 4 ++-- {internal/gilo => gilo}/buffer.go | 0 {internal/gilo => gilo}/buffer_test.go | 0 {internal/gilo => gilo}/constants.go | 0 {internal/gilo => gilo}/fn.go | 0 {internal/gilo => gilo}/fn_test.go | 0 {internal/gilo => gilo}/point.go | 0 {internal/gilo => gilo}/point_test.go | 0 {internal/key => key}/key.go | 0 {internal/key => key}/key_test.go | 0 {internal/terminal => terminal}/ansi.go | 0 {internal/terminal => terminal}/ansi_test.go | 0 {internal/terminal => terminal}/io.go | 0 {internal/terminal => terminal}/raw.go | 0 {internal/terminal => terminal}/size.go | 0 26 files changed, 19 insertions(+), 19 deletions(-) rename {internal/editor => editor}/document/document.go (98%) rename {internal/editor => editor}/document/document_test.go (100%) rename {internal/editor => editor}/document/row.go (96%) rename {internal/editor => editor}/document/row_test.go (100%) rename {internal/editor => editor}/draw.go (96%) rename {internal/editor => editor}/editor.go (96%) rename {internal/editor => editor}/editor_test.go (100%) rename {internal/editor => editor}/highlight/constants.go (100%) rename {internal/editor => editor}/highlight/fn.go (77%) rename {internal/editor => editor}/input.go (96%) rename {internal/editor => editor}/input_test.go (95%) rename {internal/gilo => gilo}/buffer.go (100%) rename {internal/gilo => gilo}/buffer_test.go (100%) rename {internal/gilo => gilo}/constants.go (100%) rename {internal/gilo => gilo}/fn.go (100%) rename {internal/gilo => gilo}/fn_test.go (100%) rename {internal/gilo => gilo}/point.go (100%) rename {internal/gilo => gilo}/point_test.go (100%) rename {internal/key => key}/key.go (100%) rename {internal/key => key}/key_test.go (100%) rename {internal/terminal => terminal}/ansi.go (100%) rename {internal/terminal => terminal}/ansi_test.go (100%) rename {internal/terminal => terminal}/io.go (100%) rename {internal/terminal => terminal}/raw.go (100%) rename {internal/terminal => terminal}/size.go (100%) diff --git a/internal/editor/document/document.go b/editor/document/document.go similarity index 98% rename from internal/editor/document/document.go rename to editor/document/document.go index 94fd28d..0c59d64 100644 --- a/internal/editor/document/document.go +++ b/editor/document/document.go @@ -4,7 +4,7 @@ import ( "bufio" "log" "os" - "timshome.page/gilo/internal/gilo" + "timshome.page/gilo/gilo" ) type Document struct { diff --git a/internal/editor/document/document_test.go b/editor/document/document_test.go similarity index 100% rename from internal/editor/document/document_test.go rename to editor/document/document_test.go diff --git a/internal/editor/document/row.go b/editor/document/row.go similarity index 96% rename from internal/editor/document/row.go rename to editor/document/row.go index 35b073c..fae1cb4 100644 --- a/internal/editor/document/row.go +++ b/editor/document/row.go @@ -2,8 +2,8 @@ package document import ( "strings" - "timshome.page/gilo/internal/editor/highlight" - "timshome.page/gilo/internal/gilo" + "timshome.page/gilo/editor/highlight" + "timshome.page/gilo/gilo" "unicode" ) diff --git a/internal/editor/document/row_test.go b/editor/document/row_test.go similarity index 100% rename from internal/editor/document/row_test.go rename to editor/document/row_test.go diff --git a/internal/editor/draw.go b/editor/draw.go similarity index 96% rename from internal/editor/draw.go rename to editor/draw.go index ca2be71..84b99be 100644 --- a/internal/editor/draw.go +++ b/editor/draw.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" "time" - "timshome.page/gilo/internal/editor/highlight" - "timshome.page/gilo/internal/gilo" - "timshome.page/gilo/internal/terminal" + "timshome.page/gilo/editor/highlight" + "timshome.page/gilo/gilo" + "timshome.page/gilo/terminal" ) // ---------------------------------------------------------------------------- diff --git a/internal/editor/editor.go b/editor/editor.go similarity index 96% rename from internal/editor/editor.go rename to editor/editor.go index 55b0e18..ed8186a 100644 --- a/internal/editor/editor.go +++ b/editor/editor.go @@ -4,10 +4,10 @@ package editor import ( "fmt" "time" - doc "timshome.page/gilo/internal/editor/document" - "timshome.page/gilo/internal/gilo" - "timshome.page/gilo/internal/key" - "timshome.page/gilo/internal/terminal" + doc "timshome.page/gilo/editor/document" + "timshome.page/gilo/gilo" + "timshome.page/gilo/key" + "timshome.page/gilo/terminal" ) // ---------------------------------------------------------------------------- diff --git a/internal/editor/editor_test.go b/editor/editor_test.go similarity index 100% rename from internal/editor/editor_test.go rename to editor/editor_test.go diff --git a/internal/editor/highlight/constants.go b/editor/highlight/constants.go similarity index 100% rename from internal/editor/highlight/constants.go rename to editor/highlight/constants.go diff --git a/internal/editor/highlight/fn.go b/editor/highlight/fn.go similarity index 77% rename from internal/editor/highlight/fn.go rename to editor/highlight/fn.go index 33e88c2..3e016ab 100644 --- a/internal/editor/highlight/fn.go +++ b/editor/highlight/fn.go @@ -1,6 +1,6 @@ package highlight -import "timshome.page/gilo/internal/terminal" +import "timshome.page/gilo/terminal" func SyntaxToColor(hl int) string { switch hl { diff --git a/internal/editor/input.go b/editor/input.go similarity index 96% rename from internal/editor/input.go rename to editor/input.go index dfe6885..d00f5d4 100644 --- a/internal/editor/input.go +++ b/editor/input.go @@ -1,10 +1,10 @@ package editor import ( - "timshome.page/gilo/internal/editor/document" - "timshome.page/gilo/internal/gilo" - "timshome.page/gilo/internal/key" - "timshome.page/gilo/internal/terminal" + "timshome.page/gilo/editor/document" + "timshome.page/gilo/gilo" + "timshome.page/gilo/key" + "timshome.page/gilo/terminal" ) // ---------------------------------------------------------------------------- diff --git a/internal/editor/input_test.go b/editor/input_test.go similarity index 95% rename from internal/editor/input_test.go rename to editor/input_test.go index f3a234f..08327d5 100644 --- a/internal/editor/input_test.go +++ b/editor/input_test.go @@ -2,8 +2,8 @@ package editor import ( "testing" - "timshome.page/gilo/internal/gilo" - "timshome.page/gilo/internal/key" + "timshome.page/gilo/gilo" + "timshome.page/gilo/key" ) type moveCursor struct { diff --git a/gilo.go b/gilo.go index 81609b4..1770bdf 100644 --- a/gilo.go +++ b/gilo.go @@ -4,8 +4,8 @@ import ( "fmt" "golang.org/x/term" "os" - "timshome.page/gilo/internal/editor" - "timshome.page/gilo/internal/terminal" + "timshome.page/gilo/editor" + "timshome.page/gilo/terminal" ) func cleanup(oldState *term.State) { diff --git a/internal/gilo/buffer.go b/gilo/buffer.go similarity index 100% rename from internal/gilo/buffer.go rename to gilo/buffer.go diff --git a/internal/gilo/buffer_test.go b/gilo/buffer_test.go similarity index 100% rename from internal/gilo/buffer_test.go rename to gilo/buffer_test.go diff --git a/internal/gilo/constants.go b/gilo/constants.go similarity index 100% rename from internal/gilo/constants.go rename to gilo/constants.go diff --git a/internal/gilo/fn.go b/gilo/fn.go similarity index 100% rename from internal/gilo/fn.go rename to gilo/fn.go diff --git a/internal/gilo/fn_test.go b/gilo/fn_test.go similarity index 100% rename from internal/gilo/fn_test.go rename to gilo/fn_test.go diff --git a/internal/gilo/point.go b/gilo/point.go similarity index 100% rename from internal/gilo/point.go rename to gilo/point.go diff --git a/internal/gilo/point_test.go b/gilo/point_test.go similarity index 100% rename from internal/gilo/point_test.go rename to gilo/point_test.go diff --git a/internal/key/key.go b/key/key.go similarity index 100% rename from internal/key/key.go rename to key/key.go diff --git a/internal/key/key_test.go b/key/key_test.go similarity index 100% rename from internal/key/key_test.go rename to key/key_test.go diff --git a/internal/terminal/ansi.go b/terminal/ansi.go similarity index 100% rename from internal/terminal/ansi.go rename to terminal/ansi.go diff --git a/internal/terminal/ansi_test.go b/terminal/ansi_test.go similarity index 100% rename from internal/terminal/ansi_test.go rename to terminal/ansi_test.go diff --git a/internal/terminal/io.go b/terminal/io.go similarity index 100% rename from internal/terminal/io.go rename to terminal/io.go diff --git a/internal/terminal/raw.go b/terminal/raw.go similarity index 100% rename from internal/terminal/raw.go rename to terminal/raw.go diff --git a/internal/terminal/size.go b/terminal/size.go similarity index 100% rename from internal/terminal/size.go rename to terminal/size.go