aboutsummaryrefslogtreecommitdiff
path: root/pkg/writer/writer.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-23 17:46:12 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-23 17:46:12 +0300
commit7745f2dcaa2c409c19c6e79bf1eaa2bc41444be0 (patch)
tree0c57a12442ec0b8e90089eddf44af78a01e8882a /pkg/writer/writer.go
parentfeat: TONS of user message parsing (#10) (diff)
downloadsdp.go-7745f2dcaa2c409c19c6e79bf1eaa2bc41444be0.tar.gz
sdp.go-7745f2dcaa2c409c19c6e79bf1eaa2bc41444be0.tar.bz2
sdp.go-7745f2dcaa2c409c19c6e79bf1eaa2bc41444be0.zip
lp parser: only get portal count and cm ticks
Diffstat (limited to 'pkg/writer/writer.go')
-rw-r--r--pkg/writer/writer.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/pkg/writer/writer.go b/pkg/writer/writer.go
deleted file mode 100644
index 6b66e75..0000000
--- a/pkg/writer/writer.go
+++ /dev/null
@@ -1,47 +0,0 @@
1package writer
2
3import (
4 "fmt"
5 "strings"
6)
7
8var output strings.Builder
9
10var temp strings.Builder
11
12func Append(str string, a ...any) {
13 _, err := output.WriteString(fmt.Sprintf(str, a...))
14 if err != nil {
15 output.WriteString(err.Error())
16 }
17}
18
19func AppendLine(str string, a ...any) {
20 Append(str, a...)
21 output.WriteString("\n")
22}
23
24func GetString() string {
25 return output.String()
26}
27
28func TempAppend(str string, a ...any) {
29 _, err := temp.WriteString(fmt.Sprintf(str, a...))
30 if err != nil {
31 temp.WriteString(err.Error())
32 }
33}
34
35func TempAppendLine(str string, a ...any) {
36 TempAppend(str, a...)
37 temp.WriteString("\n")
38}
39
40func TempGetString() string {
41 return temp.String()
42}
43
44func AppendOutputFromTemp() {
45 output.WriteString(temp.String())
46 temp.Reset()
47}