(cfg cbgt.Cfg, uuid string, tags []string, flags cbftFlags, options map[string]string)
| 101 | } |
| 102 | |
| 103 | func toolPartitionSeqs(cfg cbgt.Cfg, uuid string, tags []string, |
| 104 | flags cbftFlags, options map[string]string) (exitCode int) { |
| 105 | sourceType := options["sourceType"] |
| 106 | |
| 107 | feedType, exists := cbgt.FeedTypes[sourceType] |
| 108 | if !exists || feedType == nil { |
| 109 | fmt.Printf("tool: partitionSeqs: unknown sourceType: %s\n", sourceType) |
| 110 | return 1 |
| 111 | } |
| 112 | |
| 113 | if feedType.PartitionSeqs == nil { |
| 114 | return 0 |
| 115 | } |
| 116 | |
| 117 | partitionSeqs, err := feedType.PartitionSeqs( |
| 118 | sourceType, |
| 119 | options["sourceName"], |
| 120 | options["sourceUUID"], |
| 121 | options["sourceParams"], |
| 122 | flags.Server, |
| 123 | options) |
| 124 | if err != nil { |
| 125 | fmt.Printf("tool: partitionSeqs: err: %v\n", err) |
| 126 | return 1 |
| 127 | } |
| 128 | |
| 129 | b, err := json.Marshal(partitionSeqs) |
| 130 | if err != nil { |
| 131 | fmt.Printf("tool: partitionSeqs: json marshal, err: %v\n", err) |
| 132 | } |
| 133 | |
| 134 | fmt.Printf("%s\n", string(b)) |
| 135 | |
| 136 | return 0 |
| 137 | } |
| 138 | |
| 139 | func toolRepeatable(body toolDefHandler) toolDefHandler { |
| 140 | f := func(cfg cbgt.Cfg, uuid string, tags []string, |
nothing calls this directly
no test coverage detected