Compare commits

...

2 Commits

Author SHA1 Message Date
442804fde5 Update .gitignore 2023-11-04 13:08:03 -06:00
214cfdaea9 Project restructure
Moved source files into cmd/ and pkg/ directories
2023-11-04 13:08:03 -06:00
7 changed files with 23 additions and 11 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
venv/
lmcli
**/*.env

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"