rename modules
This commit is contained in:
parent
77b720f8d2
commit
597f26b4dd
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
@ -18,6 +19,21 @@ import (
|
||||||
"github.com/robertjanetzko/LegendsBrowser2/backend/util"
|
"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) {
|
func Analyze(filex string) {
|
||||||
fmt.Println("Search...", filex)
|
fmt.Println("Search...", filex)
|
||||||
files, err := filepath.Glob(filex + "/*.xml")
|
files, err := filepath.Glob(filex + "/*.xml")
|
|
@ -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=
|
|
|
@ -17,19 +17,9 @@ import (
|
||||||
var world *df.DfWorld
|
var world *df.DfWorld
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// a := flag.String("a", "", "analyze a file")
|
|
||||||
// g := flag.Bool("g", false, "generate model")
|
|
||||||
f := flag.String("f", "", "open a file")
|
f := flag.String("f", "", "open a file")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
// if len(*a) > 0 {
|
|
||||||
// analyze.Analyze(*a)
|
|
||||||
// }
|
|
||||||
// if *g {
|
|
||||||
// fmt.Println("Generating")
|
|
||||||
// analyze.Generate()
|
|
||||||
// }
|
|
||||||
|
|
||||||
if len(*f) > 0 {
|
if len(*f) > 0 {
|
||||||
defer profile.Start(profile.MemProfile).Stop()
|
defer profile.Start(profile.MemProfile).Stop()
|
||||||
go func() {
|
go func() {
|
||||||
|
|
Loading…
Reference in New Issue