Housekeeping

This commit is contained in:
2024-09-12 09:06:33 +02:00
parent 901232d293
commit 5cafdbf239
3 changed files with 9 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"strings"
)
type (
@@ -43,6 +44,8 @@ func (c *Class) GetOutFile() (*os.File, error) {
return nil, fmt.Errorf("ClassName is empty")
}
filename := fmt.Sprintf("%s.lua", c.ClassName)
filename = strings.ReplaceAll(filename, " ", "")
filename = strings.ReplaceAll(filename, "-", "")
f, err := os.Create(filename)
if err != nil {
return nil, err