diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-21 19:26:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 19:26:40 +0300 |
| commit | 44eefefe67a4a5f514faa4594370346fd1b54996 (patch) | |
| tree | a8853a8ecd49ddbb87c6cc19904ec6bb5419ee83 /pkg/classes/stop.go | |
| parent | add strings builder, customize ALL outputs (#6) (diff) | |
| download | sdp.go-44eefefe67a4a5f514faa4594370346fd1b54996.tar.gz sdp.go-44eefefe67a4a5f514faa4594370346fd1b54996.tar.bz2 sdp.go-44eefefe67a4a5f514faa4594370346fd1b54996.zip | |
organize packets and classes (#9)v1.1.1
Diffstat (limited to 'pkg/classes/stop.go')
| -rw-r--r-- | pkg/classes/stop.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/classes/stop.go b/pkg/classes/stop.go new file mode 100644 index 0000000..753be19 --- /dev/null +++ b/pkg/classes/stop.go | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | package classes | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | "github.com/pektezol/demoparser/pkg/writer" | ||
| 6 | ) | ||
| 7 | |||
| 8 | type Stop struct { | ||
| 9 | RemainingData []byte | ||
| 10 | } | ||
| 11 | |||
| 12 | func (stop *Stop) ParseStop(reader *bitreader.Reader) { | ||
| 13 | if reader.TryReadBool() { | ||
| 14 | stop.RemainingData = reader.TryReadBitsToSlice(uint64(reader.TryReadRemainingBits())) | ||
| 15 | writer.AppendLine("\tRemaining Data: %v", stop.RemainingData) | ||
| 16 | } | ||
| 17 | } | ||