mojang cant get their cases straight

i had to implement like 4 cases just  to parse that file
This commit is contained in:
adman
2026-04-21 09:38:14 +02:00
parent d87c362270
commit f6001c8b22
7 changed files with 265 additions and 33 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/admin-else/strom/mapstructure"
)
var Format = mapstructure.NewFormat("nbt", mapstructure.WithRequireAll())
var Format = mapstructure.NewFormat("nbt", mapstructure.WithRequireAll(), mapstructure.WithTrySnakeCase(), mapstructure.WithTryLowCase())
func ReadFile(file io.Reader, data any) (err error) {
n, err := ReadUnstructuredFile(file)