Cleanup and reorganization

This commit is contained in:
Borna Rajković committed 2024-12-12 22:12:54 +01:00
1 parent 0af5c11e6d
commit 2107b9c990
20 files changed
+158 -215

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package helpers
import (
"strings"
"testing"
)
type Function func(input string) int
func Check(t *testing.T, f Function, input string, expected int) {
if actual := f(input); actual != expected {
t.Fatalf("Expected %v, got %v", expected, actual)
}
}
func Format(input string) string {
return strings.ReplaceAll(input, "\r", "")
}