Skip to content

Go Parser: Helper function isSysPkg incorrectly identifies local packages as system packages #66

@angrychow

Description

@angrychow

Describe the bug

The isSysPkg function in lang/golang/parser/utils.go incorrectly identifies local packages as system packages. The current implementation assumes that any import path not starting with a domain-like name (e.g., github.com/...) is a system package. This logic fails for local modules defined in go.mod that do not use a domain prefix, causing them to be misclassified.

To Reproduce

If a user imported a package that its import path is not starting with a domain-like name, this bug would be triggered.

Expected behavior

skip.

Screenshots

skip.

Version:

latest.

Environment:

skip.

Additional context

skip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions