Housekeeping
This commit is contained in:
3
types.go
3
types.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user