Похожие чаты

I have two packages main.go and gopro.go in the dir

project01, okay.
package declaration in main.go is main and gopro.go is gopro
is it correct? what am I doing wrong?

5 ответов

13 просмотров

main.go and gopro.go are not packages, they're files

I can't tell you what you're doing wrong because you didn't even share your error messages

You can't declare files with different package names in a single directory. Probably move gopro.go in a subdirectory named "gopro" inside your main directory. OR declare package name as "main" in gopro.go present in your current directory.

wannabe-lokesh Автор вопроса

Похожие вопросы

Обсуждают сегодня

Карта сайта