Change godoc path to pkg.go.dev and add a manual page

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/toyohime/trunk@113 922d331f-388e-da47-97a9-ad700dc0b8b9
This commit is contained in:
yakumo.izuru 2024-02-09 21:22:42 +00:00
parent d0690bc7d6
commit 58ded33a69
4 changed files with 32 additions and 7 deletions

View File

@ -17,8 +17,10 @@ toyohime:
clean:
rm toyohime
install:
install -m0755 toyohime $(PREFIX)/bin/yorihime
install -m0755 toyohime ${DESTDIR}${PREFIX}/bin/yorihime
install -Dm0044 toyohime.1 ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1
test:
${GO} test .
uninstall:
rm -f $(PREFIX)/bin/toyohime
rm -f ${DESTDIR}${PREFIX}/bin/toyohime
rm -f ${DESTDIR}${PREFIX}/share/man/man1/toyohime.1

View File

@ -9,14 +9,14 @@ BitBucket, etc.). A commonly used vanity import path is
## Features
- Redirects browsers to godocs.io (or somewhere else)
- Redirects Go tool to VCS
- Redirects godocs.io to browsable files
* Redirects browsers to godocs.io (or somewhere else)
* Redirects Go tool to VCS
* Redirects pkg.go.dev to browsable files
## Installation
```bash
go get marisa.chaotic.ninja/toyohime
go install marisa.chaotic.ninja/toyohime/cmd/toyohime@latest
```
## Specification

23
toyohime.1 Normal file
View File

@ -0,0 +1,23 @@
.Dd $Mdocdate$
.Dt TOYOHIME 1
.Os
.Sh NAME
.Nm toyohime
.Nd Library and CLI for hosting custom vanity URIs for the Go tool
.Sh SYNOPSIS
.Nm
.Op Fl index
.Op Fl listen Ar :port
.Op Fl nohealthz
.Op Fl watch
.Sh DESCRIPTION
.Nm
is a library and command line implementation
that allows developers to have their own path
for their Go packages, closely replicating
the behavior of golang.org/x/.. as much as
possible.
.Sh AUTHORS
.An Jon Betti Aq Mt jonbetti@gmail.com
.Sh MAINTAINERS
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja

View File

@ -100,7 +100,7 @@ Nothing to see here; <a href="{{ . }}">move along</a>.
// Use default GDDO Redirector.
if cfg.redir == nil {
cfg.redir = func(pkg string) string {
return "https://godocs.io/" + pkg
return "https://pkg.go.dev/" + pkg
}
}