MVP for HTTP API (#2231)
Some checks failed
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled

Co-authored-by: Klaas Tammling <klaas@tammling.hamburg>
This commit is contained in:
Shivaram Lingamneni 2025-03-18 23:13:03 -04:00 committed by GitHub
parent 4bcd008416
commit ea81ec86e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 456 additions and 0 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/ergochat/ergo/irc"
"github.com/ergochat/ergo/irc/logger"
"github.com/ergochat/ergo/irc/mkcerts"
"github.com/ergochat/ergo/irc/utils"
)
// set via linker flags, either by make or by goreleaser:
@ -99,6 +100,7 @@ Usage:
ergo genpasswd [--conf <filename>] [--quiet]
ergo mkcerts [--conf <filename>] [--quiet]
ergo defaultconfig
ergo gentoken
ergo run [--conf <filename>] [--quiet] [--smoke]
ergo -h | --help
ergo --version
@ -141,6 +143,9 @@ Options:
} else if arguments["defaultconfig"].(bool) {
fmt.Print(defaultConfig)
return
} else if arguments["gentoken"].(bool) {
fmt.Println(utils.GenerateSecretKey())
return
} else if arguments["mkcerts"].(bool) {
doMkcerts(arguments["--conf"].(string), arguments["--quiet"].(bool))
return