michaelb/sniprun

SnipRun failed to build in go, if last line is comment..

soluty opened this issue · 1 comments

soluty commented

Describe the bug
as title

To Reproduce

  1. in main.go file, add print(1)\n // comment , select it
  2. Run the command 'SnipRun'
  3. See error 'Compile-time error: .cache/sniprun/go_ori
    ginal/main.go:3:14: syntax error: unexpec
    ted EOF, expected }'

Expected behavior
can run succuss

Additional context
content of .cache/sniprun/go_original/main.go

package main
func main() {  print(1)
  // comment}

This should be an easy fix

Thanks a lot for the report