diff --git a/Makefile b/Makefile index 349a778..903799b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 56f9bd1..08a2111 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/toyohime.1 b/toyohime.1 new file mode 100644 index 0000000..41d2e04 --- /dev/null +++ b/toyohime.1 @@ -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 diff --git a/toyohime.go b/toyohime.go index 951c79a..0439d4d 100644 --- a/toyohime.go +++ b/toyohime.go @@ -100,7 +100,7 @@ Nothing to see here; move along. // 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 } }