Files
dae/main.go

31 lines
570 B
Go
Raw Normal View History

2023-01-23 19:54:21 +08:00
//go:build linux
/*
* SPDX-License-Identifier: AGPL-3.0-only
2023-03-14 15:01:55 +08:00
* Copyright (c) 2022-2023, daeuniverse Organization <dae@v2raya.org>
2023-01-23 19:54:21 +08:00
*/
package main
import (
"net/http"
"os"
"time"
2023-03-14 15:01:55 +08:00
"github.com/daeuniverse/dae/cmd"
"github.com/daeuniverse/dae/common/json"
jsoniter "github.com/json-iterator/go"
"github.com/json-iterator/go/extra"
2023-01-23 19:54:21 +08:00
)
func main() {
jsoniter.RegisterTypeDecoder("bool", &json.FuzzyBoolDecoder{})
2023-01-27 02:10:27 +08:00
extra.RegisterFuzzyDecoders()
http.DefaultClient.Timeout = 30 * time.Second
if err := cmd.Execute(); err != nil {
os.Exit(1)
2023-01-23 19:54:21 +08:00
}
2023-01-27 02:10:27 +08:00
os.Exit(0)
2023-01-23 19:54:21 +08:00
}