mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-18 21:01:10 +01:00
Processing raw myCall
This commit is contained in:
parent
2e97cf3920
commit
0c7170d50e
1 changed files with 11 additions and 5 deletions
16
cmd/load.go
16
cmd/load.go
|
@ -22,6 +22,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// loadCmd represents the load command
|
||||
|
@ -120,18 +121,23 @@ func loadFile() {
|
|||
}
|
||||
|
||||
// ****
|
||||
// ** Process the data line
|
||||
// ** Process the Header block
|
||||
// ****
|
||||
|
||||
//** is it a Header line?
|
||||
if(regexpHeaderMyCall.MatchString(eachline)) {
|
||||
myCallList := regexpHeaderMyCall.Split(eachline,-1)
|
||||
fmt.Println(len(myCallList))
|
||||
fmt.Println("myCallList", myCallList)
|
||||
fmt.Println(myCallList[1])
|
||||
myCall := ""
|
||||
if(len(myCallList[1]) > 0) {
|
||||
myCall = strings.ToUpper(myCallList[1])
|
||||
}
|
||||
fmt.Println("my call: ", myCall)
|
||||
continue
|
||||
}
|
||||
|
||||
// ****
|
||||
// ** Process the data block
|
||||
// ****
|
||||
|
||||
fmt.Println(eachline)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue