diff options
| author | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-08-27 13:02:35 +0300 |
|---|---|---|
| committer | BiSaXa <1669855+BiSaXa@users.noreply.github.com> | 2022-08-27 13:02:35 +0300 |
| commit | f108a577658c9aab8496da4ebd0fb4f0216093e8 (patch) | |
| tree | e484a8a8b54c92ca4a393f267ebc755ec6434c8d /main.go | |
| download | sdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.tar.gz sdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.tar.bz2 sdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.zip | |
init
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 26 |
1 files changed, 26 insertions, 0 deletions
| @@ -0,0 +1,26 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "log" | ||
| 5 | "os" | ||
| 6 | "parser/messages" | ||
| 7 | "parser/utils" | ||
| 8 | ) | ||
| 9 | |||
| 10 | func main() { | ||
| 11 | if len(os.Args) != 2 { | ||
| 12 | log.Fatal("Specifiy file in command line arguments.") | ||
| 13 | } | ||
| 14 | file, err := os.Open(os.Args[1]) | ||
| 15 | utils.CheckError(err) | ||
| 16 | utils.HeaderOut(file) | ||
| 17 | for { | ||
| 18 | code := messages.MessageTypeCheck(file) | ||
| 19 | if code == 7 { | ||
| 20 | messages.MessageTypeCheck(file) | ||
| 21 | break // TODO: Check last CustomData | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | //defer file.Close() | ||
| 26 | } | ||