feat: Refactor message handling and update dependencies

- Added required packages to go.mod: `github.com/Laisky/errors/v2 v2.0.1`, `github.com/stretchr/testify v1.8.3`, `github.com/davecgh/go-spew v1.1.1`, `github.com/pmezard/go-difflib v1.0.0`
- Increased the number of returned recordings to 100 in `relay-utils.go`
- Refactored and simplified code in `relay-aiproxy.go` for improved message retrieval and error handling
- Added new test file `relay_test.go` and various test cases for different message types
- Modified functions in `group.go` and `relay.go` for improved functionality
This commit is contained in:
Laisky.Cai
2023-11-17 03:24:55 +00:00
parent 8d270c8c9a
commit 8b477d896d
8 changed files with 98 additions and 60 deletions

View File

@@ -23,17 +23,17 @@ func printHelp() {
}
func init() {
flag.Parse()
// flag.Parse()
if *PrintVersion {
fmt.Println(Version)
os.Exit(0)
}
// if *PrintVersion {
// fmt.Println(Version)
// os.Exit(0)
// }
if *PrintHelp {
printHelp()
os.Exit(0)
}
// if *PrintHelp {
// printHelp()
// os.Exit(0)
// }
if os.Getenv("SESSION_SECRET") != "" {
SessionSecret = os.Getenv("SESSION_SECRET")