Release 0.3.0 (#37)

* chore(cicd): add build and start script

* fix(client/web): fix fail to reupload same file, avoid default worker

* test(client/web): add case for worker list filtering
This commit is contained in:
Hexxa 2021-01-31 19:37:05 +08:00 committed by GitHub
parent ede6c239f0
commit c8a3f911e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 117 additions and 15 deletions

Binary file not shown.

View file

@ -1,6 +1,9 @@
package main
import (
"fmt"
"strings"
"github.com/ihexxa/gocfg"
goflags "github.com/jessevdk/go-flags"
@ -30,7 +33,14 @@ func main() {
}
if len(opts.Configs) > 0 {
for _, configPath := range opts.Configs {
cfg, err = cfg.Load(gocfg.JSON(configPath))
if strings.HasSuffix(configPath, ".yml") || strings.HasSuffix(configPath, ".yaml") {
cfg, err = cfg.Load(gocfg.YAML(configPath))
} else if strings.HasSuffix(configPath, ".json") {
cfg, err = cfg.Load(gocfg.JSON(configPath))
} else {
panic(fmt.Sprintf("unknown config file type (.yml .yaml .json are supported): %s", configPath))
}
if err != nil {
panic(err)
}