diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2022-06-19 13:31:49 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2022-06-19 13:40:39 +0100 |
| commit | 41d23c22df853b0bdf35e2d0988c8d4c4281d42f (patch) | |
| tree | 48ddc49039d6ceded97914374171157515b004be /README.md | |
| parent | 21456154ef3172490cef72a3b69bf59bb9795e43 (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.md | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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`. |
