2

I want to publish a collection of go packages as 'my.domain.tld/something'

Can I do it without running a git server on my domain? For example, can I just publish zip files and metadata at the domain name and have the go tools work with it?

I can't find documentation about how to do it.

1 Answer 1

5

These are known as vanity import paths. You can setup my.domain.tld/something to serve an HTML webpage with a go-import meta tag which points to the location the code is hosted.

The format is: <meta name="go-import" content="import-prefix vcs repo-root">

For example, you could instruct Go to fetch the code from a Github repository using something like

<meta name="go-import" content="my.domain.tld/something git github.com/myusername/myproject">

Some links:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.