aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2022-06-19 13:31:49 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2022-06-19 13:40:39 +0100
commit41d23c22df853b0bdf35e2d0988c8d4c4281d42f (patch)
tree48ddc49039d6ceded97914374171157515b004be /README.md
parent21456154ef3172490cef72a3b69bf59bb9795e43 (diff)
Move redirection logic to a separate packagev0.4.0
Also, add an optional ‘-c’ flag to pass the path to a configuration file that can be used to specify several matching patterns and replacements.
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5412c96..61b90fd 100644
--- a/README.md
+++ b/README.md
@@ -11,12 +11,16 @@ to https://godoc.org.
It can either be a normal `IP:PORT` address or an absolute path to a
UNIX socket that will be created. Defaults to `localhost:8080`. See
https://golang.org/pkg/net/#Dial for more details.
-* `-from` for the prefix that must be removed from your package name,
- e.g. `golang.org/x/` for `golang.org/x/image`.
+* `-from` for the regular expression that the import path must match,
+ including any capturing group, e.g. `go\\.example\\.com/(.+)`.
* `-to` for the URL that will be used to build the repository URL.
+ Capturing groups can be used, e.g. `https://git.example.com/$1`.
* `-vcs` for the type of VCS you are using, e.g. `git`. Defaults to
`git`.
+Additionally, a configuration file can be passed with `-c`. See
+`archlinux/go-import-redirect.conf` for an example.
+
It is recommended to enable the companion systemd socket and customize
it so systemd can start the service when needed and pass the socket to
`go-import-redirect`.