forked from fyne-io/fyne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
44 lines (38 loc) · 1019 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
34
35
36
37
38
39
40
41
42
43
44
// Run a command line helper for various Fyne tools.
package main
import (
"fmt"
"os"
"runtime/debug"
"github.com/nemesis567/fyne/cmd/fyne/internal/commands"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "fyne",
Usage: "A command line helper for various Fyne tools.",
Description: "The fyne command provides tooling for fyne applications and to assist in their development.",
Commands: []*cli.Command{
commands.Bundle(),
commands.Env(),
commands.Get(),
commands.Install(),
commands.Package(),
commands.Release(),
commands.Version(),
commands.Serve(),
commands.Build(),
// Deprecated: Use "go mod vendor" instead.
commands.Vendor(),
},
}
if info, ok := debug.ReadBuildInfo(); !ok {
app.Version = "could not retrieve version information (ensure module support is activated and build again)"
} else {
app.Version = info.Main.Version
}
if err := app.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}