v/v.go
Marc Cataford 6d72d1e51d
refactor(python-cli): push python namespace to python module
fix: use namespace in integration test

docs: update references to commands with namespace
2024-01-26 00:47:30 -05:00

39 lines
625 B
Go

package main
import (
"os"
cli "v/cli"
python "v/python"
state "v/state"
)
const (
Version = "0.0.8"
Author = "Marc Cataford <hello@karnov.club>"
Homepage = "https://github.com/mcataford/v"
)
// Main entrypoint.
func main() {
args := os.Args[1:]
currentState := state.ReadState()
root := cli.Namespace{Label: ""}
root.AddCommand(
"init", Initialize, "v init", "Initializes the v state.",
)
cli := cli.CLI{
Metadata: map[string]string{
"Version": Version,
},
}
cli.AddNamespace(root).AddNamespace(python.GetNamespace())
err := cli.Run(args, currentState)
if err != nil {
panic(err)
}
}