Browse Source

cdrtool: add debug and execute flag; cdr: move import Go files

master
Gerdriaan Mulder 6 years ago
parent
commit
a93601653e
  1. 8
      cmd/cdrtool/main.go
  2. 0
      import_cdr.go
  3. 0
      import_price.go

8
cmd/cdrtool/main.go

@ -13,6 +13,8 @@ var (
csvFile = flag.String("csv", "", "use this call detail record CSV file") 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") 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") 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() { func usage() {
@ -58,6 +60,7 @@ func main() {
log.Fatalf("importing CSV failed: %v", err) log.Fatalf("importing CSV failed: %v", err)
} }
if *debug {
for _, i := range imported { for _, i := range imported {
fmt.Printf("l: %+v\n", i) fmt.Printf("l: %+v\n", i)
} }
@ -66,3 +69,8 @@ func main() {
fmt.Printf("p: %+v\n", i) fmt.Printf("p: %+v\n", i)
} }
} }
if *priceExec {
}
}

0
import.go → import_cdr.go

0
pricing.go → import_price.go

Loading…
Cancel
Save