Compare commits

...

2 Commits

Author SHA1 Message Date
df1ef57769 fix bugs 2025-10-10 22:58:31 +03:00
4c840c40bb some changes 2025-10-10 22:54:29 +03:00
25 changed files with 58 additions and 60 deletions

View File

@@ -29,8 +29,8 @@ build:
@echo "Building..." @echo "Building..."
@# @echo "CGO_CFLAGS is: '$(CGO_CFLAGS)'" @# @echo "CGO_CFLAGS is: '$(CGO_CFLAGS)'"
@# @echo "CGO_LDFLAGS is: '$(CGO_LDFLAGS)'" @# @echo "CGO_LDFLAGS is: '$(CGO_LDFLAGS)'"
@# CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" @# CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)"
@go build -trimpath -ldflags "-w -s $(LDFLAGS)" -o $(BIN_DIR)/$(APP_NAME) ./ @cd src && go build -trimpath -ldflags "-w -s $(LDFLAGS)" -o ../$(BIN_DIR)/$(APP_NAME) ./
# @if ! command -v upx >/dev/null 2>&1; then \ # @if ! command -v upx >/dev/null 2>&1; then \
# echo "upx not found, skipping compression."; \ # echo "upx not found, skipping compression."; \
# elif upx -t $(BIN_DIR)/$(APP_NAME) >/dev/null 2>&1; then \ # elif upx -t $(BIN_DIR)/$(APP_NAME) >/dev/null 2>&1; then \

View File

@@ -7,9 +7,9 @@ import (
"log" "log"
"os" "os"
"github.com/akyaiy/GoSally-mvp/hooks" "github.com/akyaiy/GoSally-mvp/src/hooks"
"github.com/akyaiy/GoSally-mvp/internal/colors" "github.com/akyaiy/GoSally-mvp/src/internal/colors"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -1,7 +1,7 @@
package cmd package cmd
import ( import (
"github.com/akyaiy/GoSally-mvp/hooks" "github.com/akyaiy/GoSally-mvp/src/hooks"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"runtime" "runtime"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@@ -1,4 +1,4 @@
module github.com/akyaiy/GoSally-mvp module github.com/akyaiy/GoSally-mvp/src
go 1.24.4 go 1.24.4

View File

@@ -13,8 +13,6 @@ github.com/go-chi/cors v1.2.2 h1:Jmey33TE+b+rB7fT8MUy1u0I4L+NARQlK6LhzKPSyQE=
github.com/go-chi/cors v1.2.2/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= github.com/go-chi/cors v1.2.2/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=

View File

@@ -18,13 +18,13 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/akyaiy/GoSally-mvp/internal/colors" "github.com/akyaiy/GoSally-mvp/src/internal/colors"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/core/run_manager" "github.com/akyaiy/GoSally-mvp/src/internal/core/run_manager"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
"github.com/akyaiy/GoSally-mvp/internal/engine/logs" "github.com/akyaiy/GoSally-mvp/src/internal/engine/logs"
"gopkg.in/ini.v1" "gopkg.in/ini.v1"
) )

View File

@@ -11,17 +11,17 @@ import (
"regexp" "regexp"
"time" "time"
"github.com/akyaiy/GoSally-mvp/internal/colors" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/colors"
"github.com/akyaiy/GoSally-mvp/internal/core/run_manager" "github.com/akyaiy/GoSally-mvp/src/internal/core/run_manager"
"github.com/akyaiy/GoSally-mvp/internal/core/update" "github.com/akyaiy/GoSally-mvp/src/internal/core/update"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
"github.com/akyaiy/GoSally-mvp/internal/engine/logs" "github.com/akyaiy/GoSally-mvp/src/internal/engine/logs"
"github.com/akyaiy/GoSally-mvp/internal/server/gateway" "github.com/akyaiy/GoSally-mvp/src/internal/server/gateway"
"github.com/akyaiy/GoSally-mvp/internal/server/session" "github.com/akyaiy/GoSally-mvp/src/internal/server/session"
"github.com/akyaiy/GoSally-mvp/internal/server/sv1" "github.com/akyaiy/GoSally-mvp/src/internal/server/sv1"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
"github.com/go-chi/cors" "github.com/go-chi/cors"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@@ -7,8 +7,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
) )
// GetNodeUUID outputs the correct uuid from the file at the path specified in the arguments. // GetNodeUUID outputs the correct uuid from the file at the path specified in the arguments.

View File

@@ -6,7 +6,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
) )
type RunManagerContract interface { type RunManagerContract interface {

View File

@@ -13,10 +13,10 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/akyaiy/GoSally-mvp/internal/core/run_manager" "github.com/akyaiy/GoSally-mvp/src/internal/core/run_manager"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@@ -5,7 +5,7 @@ import (
"encoding/hex" "encoding/hex"
"errors" "errors"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
) )
func NewUUIDRaw(length int) ([]byte, error) { func NewUUIDRaw(length int) ([]byte, error) {

View File

@@ -9,8 +9,8 @@ import (
"sync" "sync"
"syscall" "syscall"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
) )
type AppContract interface { type AppContract interface {

View File

@@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"time" "time"
"github.com/akyaiy/GoSally-mvp/internal/colors" "github.com/akyaiy/GoSally-mvp/src/internal/colors"
) )
func (c *Compositor) Print(v any) { func (c *Compositor) Print(v any) {

View File

@@ -11,7 +11,7 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/akyaiy/GoSally-mvp/internal/engine/config" "github.com/akyaiy/GoSally-mvp/src/internal/engine/config"
"gopkg.in/natefinch/lumberjack.v2" "gopkg.in/natefinch/lumberjack.v2"
) )

View File

@@ -3,9 +3,9 @@ package lua
import ( import (
"net/http" "net/http"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
) )
type LuaEngineDeps struct { type LuaEngineDeps struct {

View File

@@ -4,10 +4,10 @@ import (
"context" "context"
"net/http" "net/http"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
"github.com/akyaiy/GoSally-mvp/internal/server/session" "github.com/akyaiy/GoSally-mvp/src/internal/server/session"
) )
// serversApiVer is a type alias for string, used to represent API version strings in the GeneralServer. // serversApiVer is a type alias for string, used to represent API version strings in the GeneralServer.

View File

@@ -3,9 +3,9 @@ package gateway
import ( import (
"errors" "errors"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
"github.com/akyaiy/GoSally-mvp/internal/server/session" "github.com/akyaiy/GoSally-mvp/src/internal/server/session"
) )
// GeneralServerInit structure only for initialization general server. // GeneralServerInit structure only for initialization general server.

View File

@@ -8,8 +8,8 @@ import (
"net/http" "net/http"
"sync" "sync"
"github.com/akyaiy/GoSally-mvp/internal/core/utils" "github.com/akyaiy/GoSally-mvp/src/internal/core/utils"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/google/uuid" "github.com/google/uuid"
) )

View File

@@ -5,7 +5,7 @@ import (
"log/slog" "log/slog"
"net/http" "net/http"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
) )
func (h *HandlerV1) Handle(_ context.Context, sid string, r *http.Request, req *rpc.RPCRequest) *rpc.RPCResponse { func (h *HandlerV1) Handle(_ context.Context, sid string, r *http.Request, req *rpc.RPCRequest) *rpc.RPCResponse {

View File

@@ -17,8 +17,8 @@ import (
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"github.com/akyaiy/GoSally-mvp/internal/colors" "github.com/akyaiy/GoSally-mvp/src/internal/colors"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
lua "github.com/yuin/gopher-lua" lua "github.com/yuin/gopher-lua"
_ "modernc.org/sqlite" _ "modernc.org/sqlite"
) )

View File

@@ -6,7 +6,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/akyaiy/GoSally-mvp/internal/server/rpc" "github.com/akyaiy/GoSally-mvp/src/internal/server/rpc"
) )
var RPCMethodSeparator = "." var RPCMethodSeparator = "."

View File

@@ -5,8 +5,8 @@ package sv1
import ( import (
"regexp" "regexp"
"github.com/akyaiy/GoSally-mvp/internal/core/corestate" "github.com/akyaiy/GoSally-mvp/src/internal/core/corestate"
"github.com/akyaiy/GoSally-mvp/internal/engine/app" "github.com/akyaiy/GoSally-mvp/src/internal/engine/app"
) )
// HandlerV1InitStruct structure is only for initialization // HandlerV1InitStruct structure is only for initialization

View File

@@ -2,7 +2,7 @@
package main package main
import ( import (
"github.com/akyaiy/GoSally-mvp/cmd" "github.com/akyaiy/GoSally-mvp/src/cmd"
_ "modernc.org/sqlite" _ "modernc.org/sqlite"
) )