codemirror 5 fix for config edit

This commit is contained in:
yusing 2024-03-29 13:13:26 +00:00
parent 2b298aa7fa
commit c789c69c86
6 changed files with 10 additions and 8 deletions

2
.gitignore vendored
View file

@ -4,5 +4,7 @@ config/**
bin/go-proxy.bak
templates/codemirror/
logs/
log/

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "templates/codemirror"]
path = templates/codemirror
url = https://github.com/codemirror/codemirror5.git

View file

@ -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

View file

@ -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)

View file

@ -37,8 +37,6 @@ func main() {
cfg = NewConfig(configPath)
cfg.MustLoad()
logrus.Info(cfg.Value())
if args.Command == CommandValidate {
logrus.Printf("config OK")
return

@ -1 +0,0 @@
Subproject commit 0c8456c3bc92fb3085ac636f5ed117df24e22ca7