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:
parent
ede6c239f0
commit
c8a3f911e8
16 changed files with 117 additions and 15 deletions
BIN
cmd/quickshare
BIN
cmd/quickshare
Binary file not shown.
|
@ -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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue