MCPcopy
hub / github.com/cayleygraph/cayley / registerDumpFlags

Function registerDumpFlags

cmd/cayley/command/database.go:54–64  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

52}
53
54func registerDumpFlags(cmd *cobra.Command) {
55 cmd.Flags().StringP(flagDump, "o", "", `quad file to dump the database to (".gz" supported, "-" for stdout)`)
56 var names []string
57 for _, f := range quad.Formats() {
58 if f.Writer != nil {
59 names = append(names, f.Name)
60 }
61 }
62 sort.Strings(names)
63 cmd.Flags().String(flagDumpFormat, "", `quad file format to use instead of auto-detection ("`+strings.Join(names, `", "`)+`")`)
64}
65
66func NewInitDatabaseCmd() *cobra.Command {
67 cmd := &cobra.Command{

Callers 3

NewConvertCmdFunction · 0.85
NewLoadDatabaseCmdFunction · 0.85
NewDumpDatabaseCmdFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected