I am having an issue while creating a new module in go with this command: go mod init <moduleName>
it successfully created go.mod file but later then throws this error go: RLock /storage/mySdCard/github.com/my-username/App/go.mod: function not implemented
& its not allowing me to install any go packages! Please help me to resolve this error or how can I fix it!!
I ran this command:
go mod init myApp
The output I got:
go: creating new go.mod: module myApp
go: updating go.mod: Lock /storage/8D8B-150E/Go/src/github.com/my-username/App/go.mod: function not implemented
The go
command uses file-locking to ensure that the go.mod
file is read in a consistent state if you run multiple go
commands concurrently.
The RLock /storage/mySdCard/github.com/my-username/App/go.mod: function not implemented
error that you're seeing indicates that the filesystem containing the go.mod
file (/storage/mySdCard
) does not support read-locking. (On most Unix-like operating systems, we use the flock
system call.)
If you can't configure the filesystem to support locking and it isn't practical for you to work within a different filesystem that does, please file an issue at https://golang.org/issue/new, and mention issue #37461 (which is closely related) in the issue description.