refactor: standardize Go layout with internal terminalstate
Audit findings: cmd/webterm and webterm package were acceptable, but terminalstate was an internal implementation detail exposed as a public package. Changes: - Move go/terminalstate -> go/internal/terminalstate - Update imports to github.com/rcarmo/webterm-go-port/internal/terminalstate - Keep package name terminalstate unchanged Resulting package layout: - github.com/rcarmo/webterm-go-port/cmd/webterm - github.com/rcarmo/webterm-go-port/internal/terminalstate - github.com/rcarmo/webterm-go-port/webterm Validation: - go test ./... - go test -race ./... - go coverage check remains 80.9% - make check Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
func newUnixHTTPTestServer(t *testing.T, handler http.Handler) (string, func()) {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
type DockerExecSpec struct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package webterm
|
||||
|
||||
import (
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
type SessionConnector interface {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"html"
|
||||
"strings"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
var ansiColors = map[string]string{
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
func TestRenderTerminalSVG(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/creack/pty"
|
||||
"github.com/google/shlex"
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
type TerminalSession struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package webterm
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/terminalstate"
|
||||
"github.com/rcarmo/webterm-go-port/internal/terminalstate"
|
||||
)
|
||||
|
||||
type fakeSession struct {
|
||||
|
||||
Reference in New Issue
Block a user