x-motemen.ghq/main.go
2026-03-19 14:54:00 +08:00

37 lines
702 B
Go

package main
import (
"context"
"fmt"
"os"
"github.com/urfave/cli/v3"
"github.com/x-motemen/ghq/logger"
)
const version = "1.9.4"
var revision = "HEAD"
func main() {
if err := newApp().Run(context.Background(), os.Args); err != nil {
exitCode := 1
if excoder, ok := err.(cli.ExitCoder); ok {
exitCode = excoder.ExitCode()
}
logger.Log("error", err.Error())
os.Exit(exitCode)
}
}
func newApp() *cli.Command {
return &cli.Command{
Name: "ghq",
Usage: "Manage remote repository clones",
Version: fmt.Sprintf("%s (rev:%s)", version, revision),
Authors: []any{"motemen <motemen@gmail.com>", "Songmu <y.songmu@gmail.com>"},
Suggest: true,
Commands: commands,
}
}