@@ -29,23 +29,26 @@ The current approach is to use `redir` command on the [golang.design](https://go
2929server. Here is the overview of its usage:
3030
3131```
32- usage: redir [-s] [-op <operator> -a <alias> -l <link>]
32+ usage: redir [-s] [-f <file>] [- op <operator> -a <alias> -l <link>]
3333options:
3434 -a string
3535 alias for a new link
36+ -f string
37+ import aliases from a YAML file
3638 -l string
3739 actual link for the alias, optional for delete/fetch
3840 -op string
3941 operators, create/update/delete/fetch (default "create")
4042 -s run redir service
4143example:
4244redir -s run the redir service
45+ redir -f ./import.yml import aliases from a file
4346redir -a alias -l link allocate new short link if possible
4447redir -op fetch -a alias fetch alias information
4548```
4649
47- For the command line usage, one only need to use ` -a ` , ` -l ` and ` -op ` if needed.
48- The command will talk to the redis data store and issue a new allocated alias.
50+ For the command line usage, one only needs to use ` -a ` , ` -l ` , and ` -op ` if needed.
51+ The command will talk to the Redis data store and issue a new allocated alias.
4952For instance, the following command:
5053
5154```
@@ -54,6 +57,14 @@ redir -a changkun -l https://changkun.de
5457
5558creates a new alias under [ golang.design/s/changkun] ( https://golang.design/s/changkun ) .
5659
60+ Import from a YAML file is also possible, for instance:
61+
62+ ```
63+ redir -f import.yml
64+ ```
65+
66+ The aliases are either imported as a new alias or updated for an existing alias.
67+
5768Moreover, it is possible to visit [ ` /s ` ] ( https://golang.design/s ) directly listing all exist aliases under [ golang.design] ( https://golang.design/ ) .
5869
5970## Build
@@ -79,4 +90,4 @@ make clean # cleanup
7990
8091## License
8192
82- MIT © ; The golang.design Initiative Authors
93+ MIT © ; The [ golang.design] ( https://golang.design ) Initiative Authors
0 commit comments