mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Use a single wrapper binary for all command line tools
This is because Go has a multi megabyte overhead for its binaries
This commit is contained in:
25
tools/cmd/main.go
Normal file
25
tools/cmd/main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"kitty/tools/cli"
|
||||
"kitty/tools/cmd/at"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var root = cli.CreateCommand(&cobra.Command{
|
||||
Use: "kitty-tool command [command options] [command args]",
|
||||
Short: "Fast, statically compiled implementations for various kitty command-line tools",
|
||||
})
|
||||
root.AddCommand(at.EntryPoint(root))
|
||||
|
||||
cli.Init(root)
|
||||
if err := root.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user