Project restructure

Moved source files into cmd/ and pkg/ directories
This commit is contained in:
Matt Low 2023-11-04 12:20:13 -06:00
parent f91ae88fcd
commit 214cfdaea9
6 changed files with 23 additions and 10 deletions

16
lmcli.go Normal file
View File

@ -0,0 +1,16 @@
package main
import (
"fmt"
"os"
"git.mlow.ca/mlow/lmcli/pkg/cli"
)
func main() {
lmcli := cli.NewRootCmd()
if err := lmcli.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}

View File

@ -1,4 +1,4 @@
package main
package cli
import (
"fmt"
@ -133,10 +133,7 @@ var promptCmd = &cobra.Command{
},
}
func main() {
func NewRootCmd() *cobra.Command {
rootCmd.AddCommand(newCmd, promptCmd)
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
return rootCmd;
}

View File

@ -1,4 +1,4 @@
package main
package cli
import (
"fmt"

View File

@ -1,4 +1,4 @@
package main
package cli
import (
"context"

View File

@ -1,4 +1,4 @@
package main
package cli
import (
"database/sql"

View File

@ -1,4 +1,4 @@
package main
package cli
import (
"os"