diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-21 01:53:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 01:53:59 +0300 |
| commit | 171e350e348afadb55967b9c13d5eadc7f7d2cf4 (patch) | |
| tree | 14ec93df8ccc1aca0cf453f826d46a402b09dc8f /pkg/packets/headers.go | |
| parent | define todos on packets (diff) | |
| download | sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.tar.gz sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.tar.bz2 sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.zip | |
add strings builder, customize ALL outputs (#6)
Diffstat (limited to 'pkg/packets/headers.go')
| -rw-r--r-- | pkg/packets/headers.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/packets/headers.go b/pkg/packets/headers.go index dbeab87..d92b22d 100644 --- a/pkg/packets/headers.go +++ b/pkg/packets/headers.go | |||
| @@ -1,9 +1,8 @@ | |||
| 1 | package packets | 1 | package packets |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "fmt" | ||
| 5 | |||
| 6 | "github.com/pektezol/bitreader" | 4 | "github.com/pektezol/bitreader" |
| 5 | "github.com/pektezol/demoparser/pkg/writer" | ||
| 7 | ) | 6 | ) |
| 8 | 7 | ||
| 9 | type Headers struct { | 8 | type Headers struct { |
| @@ -43,6 +42,6 @@ func ParseHeaders(reader *bitreader.Reader) Headers { | |||
| 43 | if headers.NetworkProtocol != 2001 { | 42 | if headers.NetworkProtocol != 2001 { |
| 44 | panic("this parser only supports demos from portal 2") | 43 | panic("this parser only supports demos from portal 2") |
| 45 | } | 44 | } |
| 46 | fmt.Printf("Headers: %+v\n", headers) | 45 | writer.AppendLine("Headers: %+v", headers) |
| 47 | return headers | 46 | return headers |
| 48 | } | 47 | } |