From 6c3de223d1a4cb7fcb581fb1bb87655e23136bc3 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Sun, 6 Oct 2024 19:25:15 -0400 Subject: [PATCH] refactor: rename modules --- cmd/joj3/main.go | 8 ++++---- cmd/joj3/{stage-runner => stage}/conf.go | 2 +- cmd/joj3/{stage-runner => stage}/conf_test.go | 2 +- cmd/joj3/{stage-runner => stage}/log.go | 2 +- cmd/joj3/{stage-runner => stage}/main.go | 2 +- cmd/joj3/{stage-runner => stage}/main_test.go | 2 +- cmd/joj3/{teapot-caller => teapot}/main.go | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename cmd/joj3/{stage-runner => stage}/conf.go (99%) rename cmd/joj3/{stage-runner => stage}/conf_test.go (99%) rename cmd/joj3/{stage-runner => stage}/log.go (98%) rename cmd/joj3/{stage-runner => stage}/main.go (99%) rename cmd/joj3/{stage-runner => stage}/main_test.go (99%) rename cmd/joj3/{teapot-caller => teapot}/main.go (93%) diff --git a/cmd/joj3/main.go b/cmd/joj3/main.go index d756b2a..fc378ce 100644 --- a/cmd/joj3/main.go +++ b/cmd/joj3/main.go @@ -3,17 +3,17 @@ package main import ( "log/slog" - stagerunner "github.com/joint-online-judge/JOJ3/cmd/joj3/stage-runner" - teapotcaller "github.com/joint-online-judge/JOJ3/cmd/joj3/teapot-caller" + "github.com/joint-online-judge/JOJ3/cmd/joj3/stage" + "github.com/joint-online-judge/JOJ3/cmd/joj3/teapot" ) func main() { // TODO: call stage-runner - if err := stagerunner.Run(); err != nil { + if err := stage.Run(); err != nil { slog.Error("stage runner error", "error", err) } // TODO: call joint-teapot - if err := teapotcaller.Run(); err != nil { + if err := teapot.Run(); err != nil { slog.Error("teapot caller error", "error", err) } } diff --git a/cmd/joj3/stage-runner/conf.go b/cmd/joj3/stage/conf.go similarity index 99% rename from cmd/joj3/stage-runner/conf.go rename to cmd/joj3/stage/conf.go index 09f84cc..ff156a3 100644 --- a/cmd/joj3/stage-runner/conf.go +++ b/cmd/joj3/stage/conf.go @@ -1,4 +1,4 @@ -package stagerunner +package stage import ( "fmt" diff --git a/cmd/joj3/stage-runner/conf_test.go b/cmd/joj3/stage/conf_test.go similarity index 99% rename from cmd/joj3/stage-runner/conf_test.go rename to cmd/joj3/stage/conf_test.go index 75631f6..237ffb4 100644 --- a/cmd/joj3/stage-runner/conf_test.go +++ b/cmd/joj3/stage/conf_test.go @@ -1,4 +1,4 @@ -package stagerunner +package stage import ( "reflect" diff --git a/cmd/joj3/stage-runner/log.go b/cmd/joj3/stage/log.go similarity index 98% rename from cmd/joj3/stage-runner/log.go rename to cmd/joj3/stage/log.go index 7c671b2..93ac8cb 100644 --- a/cmd/joj3/stage-runner/log.go +++ b/cmd/joj3/stage/log.go @@ -1,4 +1,4 @@ -package stagerunner +package stage import ( "context" diff --git a/cmd/joj3/stage-runner/main.go b/cmd/joj3/stage/main.go similarity index 99% rename from cmd/joj3/stage-runner/main.go rename to cmd/joj3/stage/main.go index f4b3a9b..fb0759b 100644 --- a/cmd/joj3/stage-runner/main.go +++ b/cmd/joj3/stage/main.go @@ -1,4 +1,4 @@ -package stagerunner +package stage import ( "encoding/json" diff --git a/cmd/joj3/stage-runner/main_test.go b/cmd/joj3/stage/main_test.go similarity index 99% rename from cmd/joj3/stage-runner/main_test.go rename to cmd/joj3/stage/main_test.go index 24ea6b6..cb9bb3c 100644 --- a/cmd/joj3/stage-runner/main_test.go +++ b/cmd/joj3/stage/main_test.go @@ -1,4 +1,4 @@ -package stagerunner +package stage import ( "encoding/json" diff --git a/cmd/joj3/teapot-caller/main.go b/cmd/joj3/teapot/main.go similarity index 93% rename from cmd/joj3/teapot-caller/main.go rename to cmd/joj3/teapot/main.go index 10087f5..4d8142e 100644 --- a/cmd/joj3/teapot-caller/main.go +++ b/cmd/joj3/teapot/main.go @@ -1,4 +1,4 @@ -package teapotcaller +package teapot import ( "log/slog"