blob: 75a56ebac76ee0b7b0fd8ce7c41e1cf0918bb205 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package classes
import (
"strings"
"github.com/pektezol/bitreader"
"github.com/pektezol/demoparser/pkg/writer"
)
type ConsoleCmd struct {
Size int32
Data string
}
func (consoleCmd *ConsoleCmd) ParseConsoleCmd(reader *bitreader.Reader) {
consoleCmd.Size = reader.TryReadSInt32()
consoleCmd.Data = reader.TryReadStringLength(uint64(consoleCmd.Size))
writer.AppendLine("\t%s", strings.TrimSpace(consoleCmd.Data))
}
|