gpm/cmd/export.go

25 lines
348 B
Go

package cmd
import (
"fmt"
"gitea.com/gpm/gpm/modules/config"
"github.com/urfave/cli/v2"
)
var Export = cli.Command{
Name: "export",
Usage: "Export JSON for local packages",
Action: doExport,
}
func doExport(ctx *cli.Context) error {
export, err := config.Export()
if err != nil {
return err
}
fmt.Println(export)
return nil
}