diff --git a/beszel/Makefile b/beszel/Makefile index 14048b2f0..df2ef4aa1 100644 --- a/beszel/Makefile +++ b/beszel/Makefile @@ -27,10 +27,10 @@ build-web-ui: fi build-agent: tidy - GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel-agent_$(OS)_$(ARCH) -ldflags "-w -s" beszel/cmd/agent + GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel-agent_$(OS)_$(ARCH) -ldflags "-w -s" github.com/henrygd/beszel/cmd/agent build-hub: tidy $(if $(filter false,$(SKIP_WEB)),build-web-ui) - GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel_$(OS)_$(ARCH) -ldflags "-w -s" beszel/cmd/hub + GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel_$(OS)_$(ARCH) -ldflags "-w -s" github.com/henrygd/beszel/cmd/hub build: build-agent build-hub @@ -58,9 +58,9 @@ dev-hub: dev-agent: @if command -v entr >/dev/null 2>&1; then \ - find ./cmd/agent/*.go ./internal/agent/*.go | entr -r go run beszel/cmd/agent; \ + find ./cmd/agent/*.go ./internal/agent/*.go | entr -r go run github.com/henrygd/beszel/cmd/agent; \ else \ - go run beszel/cmd/agent; \ + go run github.com/henrygd/beszel/cmd/agent; \ fi # KEY="..." make -j dev diff --git a/beszel/cmd/agent/agent.go b/beszel/cmd/agent/agent.go index 914378a38..b4512681d 100644 --- a/beszel/cmd/agent/agent.go +++ b/beszel/cmd/agent/agent.go @@ -1,12 +1,13 @@ package main import ( - "beszel" - "beszel/internal/agent" "fmt" "log" "os" "strings" + + "github.com/henrygd/beszel" + "github.com/henrygd/beszel/internal/agent" ) func main() { diff --git a/beszel/cmd/hub/hub.go b/beszel/cmd/hub/hub.go index 1565ffd1e..184582d4e 100644 --- a/beszel/cmd/hub/hub.go +++ b/beszel/cmd/hub/hub.go @@ -1,10 +1,10 @@ package main import ( - "beszel" - "beszel/internal/hub" + "github.com/henrygd/beszel" + "github.com/henrygd/beszel/internal/hub" - _ "beszel/migrations" + _ "github.com/henrygd/beszel/migrations" "github.com/pocketbase/pocketbase" "github.com/spf13/cobra" diff --git a/beszel/go.mod b/beszel/go.mod index dc8c56f13..652302b4a 100644 --- a/beszel/go.mod +++ b/beszel/go.mod @@ -1,4 +1,4 @@ -module beszel +module github.com/henrygd/beszel go 1.23 diff --git a/beszel/internal/agent/agent.go b/beszel/internal/agent/agent.go index 153d411fa..5715c190f 100644 --- a/beszel/internal/agent/agent.go +++ b/beszel/internal/agent/agent.go @@ -2,13 +2,14 @@ package agent import ( - "beszel" - "beszel/internal/entities/system" "context" "log/slog" "os" "strings" + "github.com/henrygd/beszel" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/shirou/gopsutil/v4/common" ) diff --git a/beszel/internal/agent/disk.go b/beszel/internal/agent/disk.go index cebdfa8f8..46ce0a0ad 100644 --- a/beszel/internal/agent/disk.go +++ b/beszel/internal/agent/disk.go @@ -1,13 +1,14 @@ package agent import ( - "beszel/internal/entities/system" "log/slog" "os" "path/filepath" "strings" "time" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/shirou/gopsutil/v4/disk" ) diff --git a/beszel/internal/agent/docker.go b/beszel/internal/agent/docker.go index 084570139..069bfbbea 100644 --- a/beszel/internal/agent/docker.go +++ b/beszel/internal/agent/docker.go @@ -1,7 +1,6 @@ package agent import ( - "beszel/internal/entities/container" "context" "encoding/json" "fmt" @@ -14,6 +13,8 @@ import ( "sync" "time" + "github.com/henrygd/beszel/internal/entities/container" + "github.com/blang/semver" ) diff --git a/beszel/internal/agent/gpu.go b/beszel/internal/agent/gpu.go index 7cc3c9e7a..2e6e7b61d 100644 --- a/beszel/internal/agent/gpu.go +++ b/beszel/internal/agent/gpu.go @@ -1,7 +1,6 @@ package agent import ( - "beszel/internal/entities/system" "bufio" "encoding/json" "fmt" @@ -12,6 +11,8 @@ import ( "sync" "time" + "github.com/henrygd/beszel/internal/entities/system" + "golang.org/x/exp/slog" ) diff --git a/beszel/internal/agent/system.go b/beszel/internal/agent/system.go index baa189c01..08321ed70 100644 --- a/beszel/internal/agent/system.go +++ b/beszel/internal/agent/system.go @@ -1,8 +1,6 @@ package agent import ( - "beszel" - "beszel/internal/entities/system" "bufio" "fmt" "log/slog" @@ -11,6 +9,9 @@ import ( "strings" "time" + "github.com/henrygd/beszel" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/shirou/gopsutil/v4/cpu" "github.com/shirou/gopsutil/v4/disk" "github.com/shirou/gopsutil/v4/host" diff --git a/beszel/internal/agent/update.go b/beszel/internal/agent/update.go index e8fa736c1..4a2331dd8 100644 --- a/beszel/internal/agent/update.go +++ b/beszel/internal/agent/update.go @@ -1,11 +1,12 @@ package agent import ( - "beszel" "fmt" "os" "strings" + "github.com/henrygd/beszel" + "github.com/blang/semver" "github.com/rhysd/go-github-selfupdate/selfupdate" ) diff --git a/beszel/internal/alerts/alerts.go b/beszel/internal/alerts/alerts.go index 13d996247..b2c646f06 100644 --- a/beszel/internal/alerts/alerts.go +++ b/beszel/internal/alerts/alerts.go @@ -2,13 +2,14 @@ package alerts import ( - "beszel/internal/entities/system" "fmt" "net/mail" "net/url" "strings" "time" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/containrrr/shoutrrr" "github.com/goccy/go-json" "github.com/pocketbase/dbx" diff --git a/beszel/internal/entities/system/system.go b/beszel/internal/entities/system/system.go index e1ef29e69..db9240700 100644 --- a/beszel/internal/entities/system/system.go +++ b/beszel/internal/entities/system/system.go @@ -1,8 +1,9 @@ package system import ( - "beszel/internal/entities/container" "time" + + "github.com/henrygd/beszel/internal/entities/container" ) type Stats struct { diff --git a/beszel/internal/hub/config.go b/beszel/internal/hub/config.go index 7e7dfbd75..de4d391ca 100644 --- a/beszel/internal/hub/config.go +++ b/beszel/internal/hub/config.go @@ -1,13 +1,14 @@ package hub import ( - "beszel/internal/entities/system" "fmt" "log" "os" "path/filepath" "strconv" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" diff --git a/beszel/internal/hub/hub.go b/beszel/internal/hub/hub.go index ac130f4b6..73087de2f 100644 --- a/beszel/internal/hub/hub.go +++ b/beszel/internal/hub/hub.go @@ -2,12 +2,13 @@ package hub import ( - "beszel" - "beszel/internal/alerts" - "beszel/internal/entities/system" - "beszel/internal/records" - "beszel/internal/users" - "beszel/site" + "github.com/henrygd/beszel" + "github.com/henrygd/beszel/internal/alerts" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/henrygd/beszel/internal/records" + "github.com/henrygd/beszel/internal/users" + "github.com/henrygd/beszel/site" + "context" "crypto/ed25519" "encoding/pem" diff --git a/beszel/internal/hub/update.go b/beszel/internal/hub/update.go index cc30b4558..7c23a7c91 100644 --- a/beszel/internal/hub/update.go +++ b/beszel/internal/hub/update.go @@ -1,11 +1,12 @@ package hub import ( - "beszel" "fmt" "os" "strings" + "github.com/henrygd/beszel" + "github.com/blang/semver" "github.com/rhysd/go-github-selfupdate/selfupdate" "github.com/spf13/cobra" diff --git a/beszel/internal/records/records.go b/beszel/internal/records/records.go index 82e8ebf34..679b2a989 100644 --- a/beszel/internal/records/records.go +++ b/beszel/internal/records/records.go @@ -2,12 +2,13 @@ package records import ( - "beszel/internal/entities/container" - "beszel/internal/entities/system" "log" "math" "time" + "github.com/henrygd/beszel/internal/entities/container" + "github.com/henrygd/beszel/internal/entities/system" + "github.com/goccy/go-json" "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase" diff --git a/beszel/internal/users/users.go b/beszel/internal/users/users.go index c2cfacb9f..d9a246c1e 100644 --- a/beszel/internal/users/users.go +++ b/beszel/internal/users/users.go @@ -2,10 +2,11 @@ package users import ( - "beszel/migrations" "log" "net/http" + "github.com/henrygd/beszel/migrations" + "github.com/pocketbase/pocketbase" "github.com/pocketbase/pocketbase/core" )