mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
30 lines
503 B
Go
30 lines
503 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/safedep/pmg/cmd/ecosystems"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func main() {
|
|
cmd := &cobra.Command{
|
|
Use: "pmg",
|
|
TraverseChildren: true,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
if len(args) == 0 {
|
|
return nil
|
|
}
|
|
return fmt.Errorf("pmg: %s is not a valid command", args[0])
|
|
},
|
|
}
|
|
|
|
cmd.AddCommand(ecosystems.NewNpmCommand())
|
|
|
|
if err := cmd.Execute(); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|