In Goland
(2022.1.3), using go
(1.19.1), it can't resolve os.Remove()
, but if I change to os.RemoveAll()
, it's ok.
I've checked go doc and source code, the function does exists.
So, what's wrong ? Is that a goland bug ?
(BTW, I'm using linux os, if that matters.)
Screenshot (in Goland):
Update: An example code that can run
package main
import (
"os"
)
func main() {
os.Create("/tmp/a.txt")
os.Remove("/tmp/a.txt")
}
The code can run without error, so I think it's goland's bug.