aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorBiSaXa <1669855+BiSaXa@users.noreply.github.com>2022-08-27 13:02:35 +0300
committerBiSaXa <1669855+BiSaXa@users.noreply.github.com>2022-08-27 13:02:35 +0300
commitf108a577658c9aab8496da4ebd0fb4f0216093e8 (patch)
treee484a8a8b54c92ca4a393f267ebc755ec6434c8d /main.go
downloadsdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.tar.gz
sdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.tar.bz2
sdp.go-f108a577658c9aab8496da4ebd0fb4f0216093e8.zip
init
Diffstat (limited to 'main.go')
-rw-r--r--main.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..6f9acb4
--- /dev/null
+++ b/main.go
@@ -0,0 +1,26 @@
1package main
2
3import (
4 "log"
5 "os"
6 "parser/messages"
7 "parser/utils"
8)
9
10func 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}