From c789c69c869a9a74550049fe10676c12c947ce65 Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 29 Mar 2024 13:13:26 +0000 Subject: [PATCH] codemirror 5 fix for config edit --- .gitignore | 2 ++ .gitmodules | 3 --- Makefile | 8 +++++++- README.md | 2 +- src/go-proxy/main.go | 2 -- templates/codemirror | 1 - 6 files changed, 10 insertions(+), 8 deletions(-) delete mode 160000 templates/codemirror diff --git a/.gitignore b/.gitignore index c6cd181..727d3f1 100755 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,7 @@ config/** bin/go-proxy.bak +templates/codemirror/ + logs/ log/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 396ec9e..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "templates/codemirror"] - path = templates/codemirror - url = https://github.com/codemirror/codemirror5.git diff --git a/Makefile b/Makefile index 58ec4ed..f669eba 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,13 @@ setup: [ -f config/config.yml ] || cp config.example.yml config/config.yml [ -f config/providers.yml ] || touch config/providers.yml [ -f compose.yml ] || cp compose.example.yml compose.yml - + +setup-codemirror: + wget https://codemirror.net/5/codemirror.zip + unzip codemirror.zip + rm codemirror.zip + mv codemirror-* templates/codemirror + build: mkdir -p bin CGO_ENABLED=0 GOOS=linux go build -pgo=auto -o bin/go-proxy src/go-proxy/*.go diff --git a/README.md b/README.md index 2d89682..8d0d296 100755 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ In the examples domain `x.y.z` is used, replace them with your domain 4. Start `go-proxy` (see [Binary](#binary) or [docker](#docker)) -5. (Optional) `git submodule update --init` in case you use web config editor +5. (Optional) `make setup-codemirror` in case you use the web config editor 6. Start editing config files - with text editor (i.e. Visual Studio Code) diff --git a/src/go-proxy/main.go b/src/go-proxy/main.go index 3b0a4b5..96e5383 100755 --- a/src/go-proxy/main.go +++ b/src/go-proxy/main.go @@ -37,8 +37,6 @@ func main() { cfg = NewConfig(configPath) cfg.MustLoad() - logrus.Info(cfg.Value()) - if args.Command == CommandValidate { logrus.Printf("config OK") return diff --git a/templates/codemirror b/templates/codemirror deleted file mode 160000 index 0c8456c..0000000 --- a/templates/codemirror +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0c8456c3bc92fb3085ac636f5ed117df24e22ca7