-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.go
25 lines (22 loc) · 816 Bytes
/
debug.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package consolizer
import (
"fmt"
"github.com/supercom32/consolizer/internal/stringformat"
"github.com/supercom32/filesystem"
"os"
)
func dumpScreenComparisons(originalScreenAsBase64 string, expectedScreenAsBase64 string) {
originalScreen := stringformat.GetStringFromBase64(originalScreenAsBase64)
os.WriteFile("/tmp/original.txt", []byte(originalScreen), 0644)
expectedScreen := stringformat.GetStringFromBase64(expectedScreenAsBase64)
os.WriteFile("/tmp/expected.txt", []byte(expectedScreen), 0644)
}
func LogInfo(info string, parameters ...any) {
var stringToAppend string
// if len(parameters) != 0 {
// stringToAppend = fmt.Sprintf(info, parameters...)
// } else {
stringToAppend = fmt.Sprintf(info, parameters...)
// }
filesystem.AppendLineToFile("/tmp/debug.log", stringToAppend+"\n", 0)
}