mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-03-02 16:12:25 +00:00
Refactor and restructure core components
- Removed obsolete files: `hanle_multi.go`, `logger.go`, `handle_com.go`, `handle_list.go`, `server.go`, and `utils.go` from the `general_server` and `sv1` packages. - Introduced new implementations for the `GeneralServer` and `HandlerV1` in the `core` package, enhancing the overall architecture. - Updated the `go.mod` and `go.sum` files to include new dependencies. - Added a new configuration structure in `config.yaml` and `config.go` for better management of application settings. - Implemented a Lua command handling mechanism in `handle_com.go` and `handle_list.go` for improved command execution. - Enhanced logging capabilities with a new logger setup in `logger.go`. - Added a new Lua script `http.lua` for handling HTTP requests.
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,6 +1,9 @@
|
||||
APP_NAME := node
|
||||
BIN_DIR := bin
|
||||
GOPATH := $(shell go env GOPATH)
|
||||
export CONFIG_PATH := ./config.yaml
|
||||
CGO_CFLAGS := -I/usr/local/include
|
||||
CGO_LDFLAGS := -L/usr/local/lib -llua5.1 -lm -ldl
|
||||
.PHONY: all build run runq test fmt vet lint check clean
|
||||
|
||||
all: build
|
||||
@@ -20,12 +23,17 @@ setup: lint-setup goimports-setup golicenses-setup
|
||||
@echo "Setup complete. Run 'make build' to compile the application."
|
||||
|
||||
build:
|
||||
@go build -o $(BIN_DIR)/$(APP_NAME) ./cmd/$(APP_NAME)
|
||||
@echo "Building..."
|
||||
@echo "CGO_CFLAGS is: '$(CGO_CFLAGS)'"
|
||||
@echo "CGO_LDFLAGS is: '$(CGO_LDFLAGS)'"
|
||||
CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o $(BIN_DIR)/$(APP_NAME) ./cmd/$(APP_NAME)
|
||||
|
||||
run: build
|
||||
@echo "Running!"
|
||||
./$(BIN_DIR)/$(APP_NAME)
|
||||
|
||||
runq: build
|
||||
@echo "Running!"
|
||||
./$(BIN_DIR)/$(APP_NAME) | jq
|
||||
|
||||
test:
|
||||
|
||||
Reference in New Issue
Block a user