Add ctui binary

This commit is contained in:
qowevisa 2024-03-14 00:06:20 +02:00
parent 544bf2b219
commit 7b8a17764e
2 changed files with 26 additions and 0 deletions

View File

@ -16,6 +16,9 @@ client:
testinp: testinp:
go build -o ./bin/$@ ./cmd/$@ go build -o ./bin/$@ ./cmd/$@
ctui:
go build -o ./bin/$@ ./cmd/$@
gen_test_certs: gen_test_certs:
openssl ecparam -genkey -name prime256v1 -out server.key openssl ecparam -genkey -name prime256v1 -out server.key
openssl req -new -x509 -key server.key -out server.pem -days 3650 openssl req -new -x509 -key server.key -out server.pem -days 3650

23
cmd/ctui/main.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"log"
"os"
"git.qowevisa.me/Qowevisa/gotell/tui"
)
func main() {
logFile, err := os.OpenFile("ctui.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
panic(err)
}
defer logFile.Close()
log.SetOutput(logFile)
log.Printf("Start")
err = tui.UI.Run()
if err != nil {
panic(err)
}
}