-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
33 lines (24 loc) · 794 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"embed"
"log"
_ "embed"
"github.com/ooaklee/ghatd/cmd/server"
"github.com/spf13/cobra"
)
// content holds our static web server content.
//
//go:embed internal/webapp/ui/html/*.tmpl.html internal/webapp/ui/static/* internal/webapp/ui/html/pages/*.tmpl.html internal/webapp/ui/html/partials/**/*.tmpl.html internal/webapp/ui/html/partials/*.tmpl.html internal/webapp/ui/html/responses/*.tmpl.html
var content embed.FS
func main() {
// Highest Level Command
rootCmd := cobra.Command{
Use: "ghatd",
Short: "The entry point of the ghatd application",
Long: "The entry point of the ghatd application",
}
rootCmd.AddCommand(server.NewCommand(&content))
if err := rootCmd.Execute(); err != nil {
log.Fatal("ghatd/error-executing-command-tree")
}
}