Open soluty opened 12 months ago
I can't even make this work outside of sniprun though. Go complains about relative paths not being a thing in module mode, not that I understand what it means...
Do you have a complete example that I could go run example.go
(and then try to make work inside sniprun) ?
I can't even make this work outside of sniprun though. Go complains about relative paths not being a thing in module mode, not that I understand what it means...
Do you have a complete example that I could
go run example.go
(and then try to make work inside sniprun) ?
i am sorry , i just make a mistake. it is in go module.
go.mod
module test
go 1.19
main.go
package main
import . "main/foo"
func main() {
Foo()
}
foo/foo.go
package foo
import "fmt"
func Foo(){
fmt.Println("foo")
}
now you can go run main.go
, and when i select the line Foo()
, i hope this could work, now it will get a compile error.
Describe the bug i use dot report in .go file, it cant work fine.
To Reproduce foo/foo.go content:
main.go content:
then i run SnipRun in line Foo(), and it cant compile fine.
Expected behavior it can process the situation with dot import .