Commit 46db0b55 authored by Etienne Renault's avatar Etienne Renault

blackbox: fix problems with imports

* tools/blackbox.go: Here.
parent 1562d2fb
......@@ -39,11 +39,13 @@ func Isolate(src, construct string, funs []string) (string, string) {
dirname, _ := os.Getwd()
idx := strings.Index(dirname, "go2pins")
if dirname[idx:] != "go2pins" {
dirname = string(dirname[idx+8:]) + "/"
if idx == -1 {
panic("Blackbox is only supported in go2pins source directory")
}
if len(dirname) > 1 {
if dirname[idx:] != "go2pins" {
dirname = string(dirname[idx+8:]) + "/"
output += "import \"gitlab.lrde.epita.fr/spot/go2pins/" + dirname + construct + "/blackbox\"\n\n"
} else {
output += "import \"gitlab.lrde.epita.fr/spot/go2pins/" + construct + "/blackbox\"\n\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment