|
|
@ -99,7 +99,7 @@ func main() { |
|
|
|
filename := goFile(flag.Args()) |
|
|
|
filename := goFile(flag.Args()) |
|
|
|
|
|
|
|
|
|
|
|
if filename == "" { |
|
|
|
if filename == "" { |
|
|
|
fmt.Println("No file to analyse") |
|
|
|
fmt.Println("\tNo file to analyse") |
|
|
|
os.Exit(1) |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ func main() { |
|
|
|
err := parseArgs(flag.Args(), allowBuiltin, casting) |
|
|
|
err := parseArgs(flag.Args(), allowBuiltin, casting) |
|
|
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
fmt.Println(err) |
|
|
|
fmt.Printf("\t%s\n", err) |
|
|
|
os.Exit(1) |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ func main() { |
|
|
|
err = loadProgram(currentPath, load) |
|
|
|
err = loadProgram(currentPath, load) |
|
|
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
fmt.Println(err) |
|
|
|
fmt.Printf("\t%s\n", err) |
|
|
|
os.Exit(1) |
|
|
|
os.Exit(1) |
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println("\tOk") |
|
|
|
fmt.Println("\tOk") |
|
|
@ -610,11 +610,15 @@ func parseArgs(toAllow []string, builtins bool, casting bool) error { |
|
|
|
funcName = filepath.Base(v) |
|
|
|
funcName = filepath.Base(v) |
|
|
|
spl := strings.Split(funcName, ".") |
|
|
|
spl := strings.Split(funcName, ".") |
|
|
|
path = path + "/" + spl[0] |
|
|
|
path = path + "/" + spl[0] |
|
|
|
|
|
|
|
if len(spl) > 1 { |
|
|
|
funcName = spl[1] |
|
|
|
funcName = spl[1] |
|
|
|
|
|
|
|
} |
|
|
|
} else if strings.ContainsRune(v, '.') { |
|
|
|
} else if strings.ContainsRune(v, '.') { |
|
|
|
spl := strings.Split(v, ".") |
|
|
|
spl := strings.Split(v, ".") |
|
|
|
path = spl[0] |
|
|
|
path = spl[0] |
|
|
|
|
|
|
|
if len(spl) > 1 { |
|
|
|
funcName = spl[1] |
|
|
|
funcName = spl[1] |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
path = "builtin" |
|
|
|
path = "builtin" |
|
|
|
funcName = v |
|
|
|
funcName = v |
|
|
|