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>
This commit is contained in:
GitHub Copilot
2026-02-15 16:19:46 +00:00
parent 6a841837af
commit 98e000e3be
13 changed files with 18 additions and 12 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ COPY cmd ./cmd
COPY internal ./internal COPY internal ./internal
COPY webterm ./webterm COPY webterm ./webterm
COPY VERSION ./VERSION 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 FROM alpine:3.21 AS runtime
+1 -1
View File
@@ -7,7 +7,7 @@ TERMINAL_JS = $(STATIC_JS_DIR)/terminal.js
GHOSTTY_WASM = $(STATIC_JS_DIR)/ghostty-vt.wasm GHOSTTY_WASM = $(STATIC_JS_DIR)/ghostty-vt.wasm
VERSION_FILE = VERSION VERSION_FILE = VERSION
VERSION = $(shell test -f $(VERSION_FILE) && cat $(VERSION_FILE) || echo dev) 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 help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
+6
View File
@@ -24,6 +24,12 @@ This repository is the Go port of the original Python implementation, which is p
## Install ## Install
### Quick install
```bash
go install github.com/rcarmo/webterm/cmd/webterm@latest
```
### Build from source ### Build from source
```bash ```bash
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/rcarmo/webterm-go-port/webterm" "github.com/rcarmo/webterm/webterm"
) )
func main() { func main() {
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/rcarmo/webterm-go-port module github.com/rcarmo/webterm
go 1.24.0 go 1.24.0
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"testing" "testing"
"time" "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()) { func newUnixHTTPTestServer(t *testing.T, handler http.Handler) (string, func()) {
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
type DockerExecSpec struct { type DockerExecSpec struct {
+1 -1
View File
@@ -1,7 +1,7 @@
package webterm package webterm
import ( import (
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
type SessionConnector interface { type SessionConnector interface {
+1 -1
View File
@@ -3,7 +3,7 @@ package webterm
import ( import (
"testing" "testing"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
type captureConnector struct { type captureConnector struct {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"html" "html"
"strings" "strings"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
var ansiColors = map[string]string{ var ansiColors = map[string]string{
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
func TestRenderTerminalSVG(t *testing.T) { func TestRenderTerminalSVG(t *testing.T) {
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/creack/pty" "github.com/creack/pty"
"github.com/google/shlex" "github.com/google/shlex"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
type TerminalSession struct { type TerminalSession struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package webterm
import ( import (
"sync" "sync"
"github.com/rcarmo/webterm-go-port/internal/terminalstate" "github.com/rcarmo/webterm/internal/terminalstate"
) )
type fakeSession struct { type fakeSession struct {