You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
redir -a alias -l link allocate new short link if possible
48
+
redir -l link allocate a random alias for the given link if possible
47
49
redir -op fetch -a alias fetch alias information
48
50
```
49
51
@@ -52,32 +54,42 @@ The command will talk to the Redis data store and issue a new allocated alias.
52
54
For instance, the following command:
53
55
54
56
```
55
-
redir -a changkun -l https://changkun.de
57
+
$ redir -a changkun -l https://changkun.de
58
+
https://golang.design/s/changkun
56
59
```
57
60
58
61
creates a new alias under [golang.design/s/changkun](https://golang.design/s/changkun).
59
62
63
+
If the `-a` is not provided, then redir command will generate a random string as an alias, but the link can only be accessed under `/r/alias`. For instance:
64
+
65
+
```
66
+
$ redir -l https://changkun.de
67
+
https://golang.design/r/qFlKSP
68
+
```
69
+
70
+
creates a new alias under [golang.design/r/qFlKSP](https://golang.design/r/qFlKSP).
71
+
60
72
Import from a YAML file is also possible, for instance:
61
73
62
74
```
63
-
redir -f import.yml
75
+
$ redir -f import.yml
64
76
```
65
77
66
78
The aliases are either imported as a new alias or updated for an existing alias.
67
79
68
-
Moreover, it is possible to visit [`/s`](https://golang.design/s) directly listing all exist aliases under [golang.design](https://golang.design/).
80
+
Moreover, it is possible to visit [`/s`](https://golang.design/s)or [`/r`](https://golang.design/r)directly listing all exist aliases under [golang.design](https://golang.design/).
69
81
70
82
## Build
71
83
72
84
`Makefile` defines different ways to build the service:
0 commit comments