Skip to content

Fix go run syntax - #128

Merged
elgopher merged 1 commit into
masterfrom
elgopher-patch-1
Jul 8, 2025
Merged

Fix go run syntax#128
elgopher merged 1 commit into
masterfrom
elgopher-patch-1

Conversation

@elgopher

@elgopher elgopher commented Jul 8, 2025

Copy link
Copy Markdown
Owner

Go reports error for user command

~ go run github.com/elgopher/pi/_examples/snake

no required module provides package github.com/elgopher/pi/_examples/snake: go.mod file not found in current directory or any parent directory; see 'go help modules' 

The message is misleading, but it means that user did not provided the required @version suffix. This is required starting from Go 1.17.

Go reports error  for user command

`> go run github.com/elgopher/pi/_examples/snake
no required module provides package github.com/elgopher/pi/_examples/snake: go.mod file not found in current directory or any parent directory; see 'go help modules'
`

The message is misleading. Starting from Go 1.17, go run requires @Version suffix.
@elgopher
elgopher merged commit 20a0910 into master Jul 8, 2025
1 check passed
@elgopher
elgopher deleted the elgopher-patch-1 branch July 8, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant