rename modules

This commit is contained in:
Robert Janetzko 2022-04-14 14:06:17 +00:00
parent 77b720f8d2
commit 597f26b4dd
3 changed files with 16 additions and 12 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"encoding/json"
"encoding/xml"
"flag"
"fmt"
"io"
"io/ioutil"
@ -18,6 +19,21 @@ import (
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
)
func main() {
a := flag.String("a", "", "analyze a file")
g := flag.Bool("g", false, "generate model")
flag.Parse()
if len(*a) > 0 {
Analyze(*a)
}
if *g {
fmt.Println("Generating")
Generate()
}
}
func Analyze(filex string) {
fmt.Println("Search...", filex)
files, err := filepath.Glob(filex + "/*.xml")

View File

@ -1,2 +0,0 @@
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=

View File

@ -17,19 +17,9 @@ import (
var world *df.DfWorld
func main() {
// a := flag.String("a", "", "analyze a file")
// g := flag.Bool("g", false, "generate model")
f := flag.String("f", "", "open a file")
flag.Parse()
// if len(*a) > 0 {
// analyze.Analyze(*a)
// }
// if *g {
// fmt.Println("Generating")
// analyze.Generate()
// }
if len(*f) > 0 {
defer profile.Start(profile.MemProfile).Stop()
go func() {