diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-06-15 13:58:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 13:58:30 +0300 |
| commit | 77e4b066cb8d506b4bc944ab4eb2d6e4679e2202 (patch) | |
| tree | 1d549eca619ed36cb881e487cb054c4643ac8376 /pkg/messages/types/svcPrint.go | |
| parent | change project name to sdp.go (diff) | |
| download | sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.gz sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.bz2 sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.zip | |
enable multithreading with goroutines (#20)
Diffstat (limited to 'pkg/messages/types/svcPrint.go')
| -rw-r--r-- | pkg/messages/types/svcPrint.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/messages/types/svcPrint.go b/pkg/messages/types/svcPrint.go index 56f0d08..0db7ffd 100644 --- a/pkg/messages/types/svcPrint.go +++ b/pkg/messages/types/svcPrint.go | |||
| @@ -4,18 +4,18 @@ 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 SvcPrint struct { | 10 | type SvcPrint struct { |
| 11 | Message string | 11 | Message string `json:"message"` |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | func ParseSvcPrint(reader *bitreader.Reader) SvcPrint { | 14 | func ParseSvcPrint(reader *bitreader.Reader, demo *types.Demo) SvcPrint { |
| 15 | svcPrint := SvcPrint{ | 15 | svcPrint := SvcPrint{ |
| 16 | Message: reader.TryReadString(), | 16 | Message: reader.TryReadString(), |
| 17 | } | 17 | } |
| 18 | // common psycopath behaviour | 18 | // common psycopath behaviour |
| 19 | writer.TempAppendLine("\t\t%s", strings.Replace(strings.ReplaceAll(strings.ReplaceAll(svcPrint.Message, "\n", "\n\t\t"), "\n\t\t\n\t\t", ""), "\n\t\t", "", 1)) | 19 | demo.Writer.TempAppendLine("\t\t%s", strings.Replace(strings.ReplaceAll(strings.ReplaceAll(svcPrint.Message, "\n", "\n\t\t"), "\n\t\t\n\t\t", ""), "\n\t\t", "", 1)) |
| 20 | return svcPrint | 20 | return svcPrint |
| 21 | } | 21 | } |