rename project name

This commit is contained in:
Balakrishnan Balasubramanian 2023-03-29 17:22:11 -04:00
parent fb8fa61546
commit a479dab96c
2 changed files with 8 additions and 8 deletions

4
go.mod
View File

@ -1,3 +1,3 @@
module gitea.balki.me/telegram-msgchkbox
module go.balki.me/tglistbot
go 1.19
go 1.20

12
main.go
View File

@ -17,21 +17,21 @@ import (
"sync"
"time"
"gitea.balki.me/telegram-msgchkbox/glist"
"go.balki.me/tglistbot/glist"
)
var apiToken string
func main() {
apiToken = os.Getenv("CHKBOT_API_TOKEN")
apiToken = os.Getenv("TGLB_API_TOKEN")
if apiToken == "" {
log.Panicln("CHKBOT_API_TOKEN is empty")
log.Panicln("TG_API_TOKEN is empty")
}
port, unixSocketPath := func() (int, string) {
portStr := os.Getenv("CHKBOT_PORT")
portStr := os.Getenv("TGLB_PORT")
defaultPort := 28923
@ -46,7 +46,7 @@ func main() {
}()
dataPath := func() string {
dataPath := os.Getenv("CHKBOT_DATA_PATH")
dataPath := os.Getenv("TGLB_DATA_PATH")
if dataPath == "" {
return "."
}
@ -77,7 +77,7 @@ func main() {
return fmt.Sprintf("port: %v", port)
}()
log.Printf("Grocery List bot (%s) starting with datapath: %q, %s\n", commit, dataPath, listeningOn)
log.Printf("List bot (%s) starting with datapath: %q, %s\n", commit, dataPath, listeningOn)
var chats sync.Map
if err := loadData(dataPath, &chats); err != nil {