refactor(commands): extract commands to own module

This commit is contained in:
Marc 2024-01-31 20:15:01 -05:00
parent e33237ca74
commit 8b2b27961e
Signed by: marc
GPG key ID: 048E042F22B5DC79
3 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,4 @@
package main
package commands
import (
"maps"

View file

@ -1,4 +1,4 @@
package main
package commands
import (
"bytes"

3
v.go
View file

@ -3,6 +3,7 @@ package main
import (
"os"
cli "v/cli"
commands "v/commands"
python "v/python"
state "v/state"
)
@ -20,7 +21,7 @@ func main() {
root := cli.Namespace{Label: ""}
root.AddCommand(
"init", Initialize, "v init", "Initializes the v state.",
"init", commands.Initialize, "v init", "Initializes the v state.",
)
cli := cli.CLI{