Skip to content

Use package name instead of go_default_library to define a default library #265

@DrMarcII

Description

@DrMarcII

Currently if you have lib/BUILD with

go_library(
    name = "go_default_library",
    ...
)

That is used in test/test.go, you would import as:

import "go_prefix/lib"

But would have to have the following in test/BUILD file:

go_test(
    name = "test",
    ...
    deps = ["//lib:go_default_library"],
)

It would be cleaner if instead, you could set the name to "lib" in lib/BUILD and have the deps be "//lib" in test/BUILD while keeping the import in test/test.go the same.

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