diff options
Diffstat (limited to '')
| -rw-r--r-- | pkg/classes/consoleCmd.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/classes/consoleCmd.go b/pkg/classes/consoleCmd.go index 47a44e0..83f7333 100644 --- a/pkg/classes/consoleCmd.go +++ b/pkg/classes/consoleCmd.go | |||
| @@ -4,16 +4,16 @@ import ( | |||
| 4 | "strings" | 4 | "strings" |
| 5 | 5 | ||
| 6 | "github.com/pektezol/bitreader" | 6 | "github.com/pektezol/bitreader" |
| 7 | "github.com/pektezol/sdp.go/pkg/writer" | 7 | "github.com/pektezol/sdp.go/pkg/types" |
| 8 | ) | 8 | ) |
| 9 | 9 | ||
| 10 | type ConsoleCmd struct { | 10 | type ConsoleCmd struct { |
| 11 | Size int32 | 11 | Size int32 `json:"size"` |
| 12 | Data string | 12 | Data string `json:"data"` |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | func (consoleCmd *ConsoleCmd) ParseConsoleCmd(reader *bitreader.Reader) { | 15 | func (consoleCmd *ConsoleCmd) ParseConsoleCmd(reader *bitreader.Reader, demo *types.Demo) { |
| 16 | consoleCmd.Size = reader.TryReadSInt32() | 16 | consoleCmd.Size = reader.TryReadSInt32() |
| 17 | consoleCmd.Data = reader.TryReadStringLength(uint64(consoleCmd.Size)) | 17 | consoleCmd.Data = reader.TryReadStringLength(uint64(consoleCmd.Size)) |
| 18 | writer.AppendLine("\t%s", strings.TrimSpace(consoleCmd.Data)) | 18 | demo.Writer.AppendLine("\t%s", strings.TrimSpace(consoleCmd.Data)) |
| 19 | } | 19 | } |