https://github.com/borud/customdomain
Demo of Go packages on custom domains
https://github.com/borud/customdomain
Last synced: over 1 year ago
JSON representation
Demo of Go packages on custom domains
- Host: GitHub
- URL: https://github.com/borud/customdomain
- Owner: borud
- Created: 2022-02-14T14:30:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-14T14:56:54.000Z (over 4 years ago)
- Last Synced: 2024-06-20T06:38:24.255Z (almost 2 years ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go packages on custom domain
This is a recipe for how you put your Github hosted packages on a custom domain. We are going to use this repository as an example. It contains a package called `customdomain` and the `go.mod` file looks like this:
```text
module borud.no/customdomain
go 1.17
```
In order to redirect the Go tools to this github repository we need to create an HTML file that looks like this:
```html
customdomain
customdomain
Description here.
```
Substitute for whatever your domain name, package name and github repository should be and you now have a custom domain name in your package name.
## Using this package
```go
package main
import "borud.no/customdomain"
func main() {
dummy := customdomain.Sometype{}
dummy.Hello()
}
```
## Private repositories
If you are using private repositories you want to specify the `git+ssh` URL rather than the `https` URL for the actual repository.