Project restructure
Moved source files into cmd/ and pkg/ directories
This commit is contained in:
parent
f91ae88fcd
commit
214cfdaea9
16
lmcli.go
Normal file
16
lmcli.go
Normal 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)
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package cli
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package cli
|
||||
|
||||
import (
|
||||
"database/sql"
|
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package cli
|
||||
|
||||
import (
|
||||
"os"
|
Loading…
Reference in New Issue
Block a user