I have this directory structure -
go
|
arrays
|
go.mod
main.go
twosum
|
twosum.go
I am trying to import the TwoSum
function I created in the directory (package) twosum
, inside the main.go
file in the arrays
module - using import "arrays/twosum"
But I keep getting an error that the import is not found. I’m not even sure what I’m doing wrong, I followed the same order defined here - How to Use Go Modules | DigitalOcean as an example.