Skip to content

https://go.dev/doc/tutorial/call-module-code: Following instructions causes compiler error #61527

@theneekz

Description

@theneekz

What is the URL of the page with the issue?

https://go.dev/doc/tutorial/call-module-code

Screenshot

image

What did you do?

Followed instructions for calling code from another module. Even though the go.mod file was updated to replace example.com/greetings with ../greetings, the Go VSCode extension (v0.39.1) shows an error in hello.go where "example.com/greetings" is imported.

image

What did you expect to see?

No compiler(BrokenImport) error. Why would following the tutorial cause compiler error? Is this tutorial not the recommended way for using relative import paths? As a beginner looking to learn the basics, this isn't very clear.

This seems related to #52134 but my $PATH variable already has usr/local/go/bin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions