Skip to content

Go module name does not match import path  #1

@jhoyla

Description

@jhoyla

The package's name in go.mod is github.com/signalapp/keytransparency, but the Github URL is https://github.com/signalapp/key-transparency-server.
This means that go getting the package fails.

$ go get github.com/signalapp/key-transparency-server
go: github.com/signalapp/key-transparency-server@upgrade (v0.0.0-20250711161232-a3732f0c03c7) requires github.com/signalapp/key-transparency-server@v0.0.0-20250711161232-a3732f0c03c7: parsing go.mod:
	module declares its path as: github.com/signalapp/keytransparency
	       but was required as: github.com/signalapp/key-transparency-server

The package name is also used in the README.md's Quickstart section, which means the instructions give:

$ go run github.com/signalapp/keytransparency/cmd/generate-keys
no required module provides package github.com/signalapp/keytransparency/cmd/generate-keys; to add it:
	go get github.com/signalapp/keytransparency/cmd/generate-keys
$ go get github.com/signalapp/keytransparency/cmd/generate-keys
go: module github.com/signalapp/keytransparency/cmd/generate-keys: git ls-remote -q origin in /go/pkg/mod/cache/vcs/99c8064ca5218d57a4aea2c262ddad46835dc5aa694c539e69df0c987e23e0a5: exit status 128:
	fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.

Finally, the Go spec doesn't appear to allow for -'s in package names. See the sections on Packages and Identifiers.

If this is the expected behavior, I'm happy to open a PR to document it.
If not, I'm also happy to open a PR to update the package name.

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