2023-03-04 01:15:09 +00:00
|
|
|
package main
|
|
|
|
|
2023-03-04 22:19:27 +00:00
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
|
|
|
|
|
|
"git.tilde.town/tildetown/town/towndb"
|
|
|
|
)
|
2023-03-04 01:15:09 +00:00
|
|
|
|
|
|
|
// TODO this command adds a new user to /town/var/town.db
|
2023-03-04 22:19:27 +00:00
|
|
|
// it's meant to be invoked by the welcome binary upon successfully
|
|
|
|
// creating a new user account
|
|
|
|
|
|
|
|
func _main(db *sql.DB) error {
|
|
|
|
return nil
|
|
|
|
}
|
2023-03-04 01:15:09 +00:00
|
|
|
|
|
|
|
func main() {
|
2023-03-04 22:19:27 +00:00
|
|
|
towndb, err := towndb.ConnectDB()
|
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
if err = _main(towndb); err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
os.Exit(2)
|
|
|
|
}
|
2023-03-04 01:15:09 +00:00
|
|
|
}
|