Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dpb587/go-importshttp

Utilities for hosting Go packages on custom/vanity domains.
https://github.com/dpb587/go-importshttp

golang imports modules packages vanity

Last synced: about 1 month ago
JSON representation

Utilities for hosting Go packages on custom/vanity domains.

Awesome Lists containing this project

README

        

# go.dpb.io/importshttp

Utilities for hosting Go packages on custom/vanity domains.

* automatic `go-import` and `go-source` parameters used by Go tooling
* theming with professional listing and package views by default
* configurable action links for packages (e.g. `pkg.go.dev`, repository source, custom URLs)
* used as a server, static site generator, or generic `http.Handler`
* YAML-based or programmatic configuration

## Usage

For a live example, visit [go.dpb.io](https://go.dpb.io) ([source](https://github.com/dpb587/go.dpb.io); automated via [Cloud Build](https://cloud.google.com/build) and deployed to [Cloud Run](https://cloud.google.com/run)).

To run a server locally, use the [`cmd/server` package](cmd/server)...

```bash
go run go.dpb.io/importshttp/cmd/server \
-pkg=go.example.com/firstpackage=github.com/golang/go/tree/master \
-pkg=go.example.com/secondpackage=bitbucket.org/example/secondpackage/src/master
```

To publish a static site with GitHub Pages + Actions, use the [`dpb587/go-importshttp-for-github` template](https://github.com/dpb587/go-importshttp-for-github).

Learn more from the [`examples` directory](examples) and [code documentation](https://pkg.go.dev/go.dpb.io/importshttp).

## License

[MIT License](LICENSE)