From 98e000e3bee3be6624a10a3eaefddc0058faf2b0 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sun, 15 Feb 2026 16:19:46 +0000 Subject: [PATCH] Fix module path mismatch for go install Resolve GitHub issue #2 by aligning the Go module identity with the repository path so works. Changes made: - Updated go.mod module path from github.com/rcarmo/webterm-go-port to github.com/rcarmo/webterm. - Updated all internal import references to the new module path. - Updated version ldflags in Makefile and Dockerfile to use github.com/rcarmo/webterm/webterm.Version. - Added README quick-install section documenting the command. Validation: - Ran make check successfully after the rename/import updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Dockerfile | 2 +- Makefile | 2 +- README.md | 6 ++++++ cmd/webterm/main.go | 2 +- go.mod | 2 +- webterm/coverage_boost_test.go | 2 +- webterm/docker_exec_session.go | 2 +- webterm/session.go | 2 +- webterm/session_helpers_test.go | 2 +- webterm/svg_exporter.go | 2 +- webterm/svg_exporter_test.go | 2 +- webterm/terminal_session.go | 2 +- webterm/test_helpers_test.go | 2 +- 13 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 478dc11..1374c77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ COPY cmd ./cmd COPY internal ./internal COPY webterm ./webterm COPY VERSION ./VERSION -RUN VERSION=$(cat /src/VERSION) && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/rcarmo/webterm-go-port/webterm.Version=$VERSION" -o /out/webterm ./cmd/webterm +RUN VERSION=$(cat /src/VERSION) && CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/rcarmo/webterm/webterm.Version=$VERSION" -o /out/webterm ./cmd/webterm FROM alpine:3.21 AS runtime diff --git a/Makefile b/Makefile index dcb69a3..821bf83 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TERMINAL_JS = $(STATIC_JS_DIR)/terminal.js GHOSTTY_WASM = $(STATIC_JS_DIR)/ghostty-vt.wasm VERSION_FILE = VERSION VERSION = $(shell test -f $(VERSION_FILE) && cat $(VERSION_FILE) || echo dev) -GO_VERSION_LDFLAGS = -X github.com/rcarmo/webterm-go-port/webterm.Version=$(VERSION) +GO_VERSION_LDFLAGS = -X github.com/rcarmo/webterm/webterm.Version=$(VERSION) help: ## Show this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' diff --git a/README.md b/README.md index 97eada3..835dd7f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ This repository is the Go port of the original Python implementation, which is p ## Install +### Quick install + +```bash +go install github.com/rcarmo/webterm/cmd/webterm@latest +``` + ### Build from source ```bash diff --git a/cmd/webterm/main.go b/cmd/webterm/main.go index f9aaade..ae84fd9 100644 --- a/cmd/webterm/main.go +++ b/cmd/webterm/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/rcarmo/webterm-go-port/webterm" + "github.com/rcarmo/webterm/webterm" ) func main() { diff --git a/go.mod b/go.mod index 57fbf89..d945f79 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/rcarmo/webterm-go-port +module github.com/rcarmo/webterm go 1.24.0 diff --git a/webterm/coverage_boost_test.go b/webterm/coverage_boost_test.go index 552e2c0..6f0989d 100644 --- a/webterm/coverage_boost_test.go +++ b/webterm/coverage_boost_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) func newUnixHTTPTestServer(t *testing.T, handler http.Handler) (string, func()) { diff --git a/webterm/docker_exec_session.go b/webterm/docker_exec_session.go index 44df49c..6d346c9 100644 --- a/webterm/docker_exec_session.go +++ b/webterm/docker_exec_session.go @@ -13,7 +13,7 @@ import ( "strings" "sync" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) type DockerExecSpec struct { diff --git a/webterm/session.go b/webterm/session.go index 150953d..e92a0fc 100644 --- a/webterm/session.go +++ b/webterm/session.go @@ -1,7 +1,7 @@ package webterm import ( - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) type SessionConnector interface { diff --git a/webterm/session_helpers_test.go b/webterm/session_helpers_test.go index f75377e..f5ab0c8 100644 --- a/webterm/session_helpers_test.go +++ b/webterm/session_helpers_test.go @@ -3,7 +3,7 @@ package webterm import ( "testing" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) type captureConnector struct { diff --git a/webterm/svg_exporter.go b/webterm/svg_exporter.go index a63ae09..9100041 100644 --- a/webterm/svg_exporter.go +++ b/webterm/svg_exporter.go @@ -5,7 +5,7 @@ import ( "html" "strings" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) var ansiColors = map[string]string{ diff --git a/webterm/svg_exporter_test.go b/webterm/svg_exporter_test.go index d856734..e4a02ec 100644 --- a/webterm/svg_exporter_test.go +++ b/webterm/svg_exporter_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) func TestRenderTerminalSVG(t *testing.T) { diff --git a/webterm/terminal_session.go b/webterm/terminal_session.go index f8612b5..20e8c8d 100644 --- a/webterm/terminal_session.go +++ b/webterm/terminal_session.go @@ -10,7 +10,7 @@ import ( "github.com/creack/pty" "github.com/google/shlex" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) type TerminalSession struct { diff --git a/webterm/test_helpers_test.go b/webterm/test_helpers_test.go index a8a0bfa..ea31b57 100644 --- a/webterm/test_helpers_test.go +++ b/webterm/test_helpers_test.go @@ -3,7 +3,7 @@ package webterm import ( "sync" - "github.com/rcarmo/webterm-go-port/internal/terminalstate" + "github.com/rcarmo/webterm/internal/terminalstate" ) type fakeSession struct {