|
|
|
@ -13,6 +13,8 @@ var ( |
|
|
|
csvFile = flag.String("csv", "", "use this call detail record CSV file") |
|
|
|
validate = flag.Bool("validate", false, "only validate the call detail record CSV, perform no other actions") |
|
|
|
pricesFile = flag.String("prices", "", "use this pricing CSV file") |
|
|
|
priceExec = flag.Bool("execute", false, "price each CDR according to the prices file") |
|
|
|
debug = flag.Bool("debug", false, "show extra debugging") |
|
|
|
) |
|
|
|
|
|
|
|
func usage() { |
|
|
|
@ -58,11 +60,17 @@ func main() { |
|
|
|
log.Fatalf("importing CSV failed: %v", err) |
|
|
|
} |
|
|
|
|
|
|
|
for _, i := range imported { |
|
|
|
fmt.Printf("l: %+v\n", i) |
|
|
|
if *debug { |
|
|
|
for _, i := range imported { |
|
|
|
fmt.Printf("l: %+v\n", i) |
|
|
|
} |
|
|
|
|
|
|
|
for _, i := range importedPrices { |
|
|
|
fmt.Printf("p: %+v\n", i) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for _, i := range importedPrices { |
|
|
|
fmt.Printf("p: %+v\n", i) |
|
|
|
if *priceExec { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|