Open Mgrdich opened 7 months ago
I don't think that's a valid module name (.com
).
Seems to work if you change it to something more normal.
it works when i change the module name , even though it was working some of the time , but giving issues alot of the other times.
A module path must satisfy the following requirements:
- The path must consist of one or more path elements separated by slashes (/, U+002F). It must not begin or end with a slash.
- (...)
- A path element may not begin or end with a dot (., U+002E).
(...)
Cf. https://go.dev/ref/mod#go-mod-file-ident [2024-04-27]
yes @jfrech but shouldn't the compiler return the correct error , instead of R_USEIFACE in which is not a type or itab
@Mgrdich I am all for less obtuse failure diagnostics. Yet you wrote "What did you expect to see? ; It should compile the project and produce the executable.", which is behaviour which violates the modules specification.
@jfrech my bad , I did not know back then it was a module name issue , I will change what do I expect .
Go version
go1.22.1
Output of
go env
in your module/workspace:What did you do?
It is happening when everything is in different folder , and initiated with different packages , that is why i cannot link go.dev/play
but i can link the github repo with a branch that this is happening
https://github.com/Mgrdich/testGoApi/tree/bug/issue/golang
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/routes/person.go#L18
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/middlewares/movies.go#L28
https://github.com/Mgrdich/testGoApi/blob/fd329312a1472c5d3c5269f792a438d999e43829/internal/middlewares/id_context.go#L14
What did you see happen?
i keep getting this compile time error
as i noticed it is happening something with the folder and package structure
What did you expect to see?
It return the correct error , with description that module name is invalid.