diff --git a/.drone.yml b/.drone.yml index f7f8117..1951330 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: build image: golang commands: - - go build -o valera_tg_bot main.go + - go build -o valera_tg_bot cmd/valera/main.go - name: test image: golang diff --git a/.fleet/run.json b/.fleet/run.json deleted file mode 100644 index 6c4c11d..0000000 --- a/.fleet/run.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "configurations": [ - { - "type": "go", - "name": "run", - "goExecPath": "/usr/local/go/bin/go", - "buildParams": [ - "$PROJECT_DIR$/main.go", - ], - }, - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index ae6bf4d..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Используйте IntelliSense, чтобы узнать о возможных атрибутах. - // Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов. - // Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "run", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceFolder}\\main.go" - } - ] -} diff --git a/main.go b/cmd/valera/main.go similarity index 98% rename from main.go rename to cmd/valera/main.go index 46dc96e..6a97bf7 100644 --- a/main.go +++ b/cmd/valera/main.go @@ -9,10 +9,10 @@ import ( "os" "strconv" "strings" - "valera/calories" - "valera/commands" - "valera/db" - "valera/pause" + "valera/internal/calories" + "valera/internal/commands" + "valera/internal/db" + "valera/internal/pause" tgbot "github.com/go-telegram-bot-api/telegram-bot-api" "github.com/umputun/go-flags" @@ -28,7 +28,7 @@ var ( ) const ( - version = "v1.6.0" + version = "v1.6.1" ) type Opts struct { diff --git a/calories/calories.go b/internal/calories/calories.go similarity index 100% rename from calories/calories.go rename to internal/calories/calories.go diff --git a/calories/calories_test.go b/internal/calories/calories_test.go similarity index 100% rename from calories/calories_test.go rename to internal/calories/calories_test.go diff --git a/commands/command.go b/internal/commands/command.go similarity index 100% rename from commands/command.go rename to internal/commands/command.go diff --git a/config/config.go b/internal/config/config.go similarity index 100% rename from config/config.go rename to internal/config/config.go diff --git a/db/calories.go b/internal/db/calories.go similarity index 100% rename from db/calories.go rename to internal/db/calories.go diff --git a/db/chat.go b/internal/db/chat.go similarity index 100% rename from db/chat.go rename to internal/db/chat.go diff --git a/db/db.go b/internal/db/db.go similarity index 99% rename from db/db.go rename to internal/db/db.go index dc8feb4..925b75b 100644 --- a/db/db.go +++ b/internal/db/db.go @@ -4,7 +4,7 @@ import ( "context" "log" "time" - "valera/config" + "valera/internal/config" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" diff --git a/db/workout.go b/internal/db/workout.go similarity index 100% rename from db/workout.go rename to internal/db/workout.go diff --git a/pause/pause.go b/internal/pause/pause.go similarity index 100% rename from pause/pause.go rename to internal/pause/pause.go