mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 07:35:10 +01:00
feat: module periority
This commit is contained in:
parent
03904775f5
commit
c1e575c32a
9 changed files with 27 additions and 18 deletions
|
|
@ -17,10 +17,12 @@
|
|||
There are 2 types of modules:
|
||||
|
||||
- **Standard module**: Will always run to retrieve suggestions
|
||||
- Naming convention: `_pay-respects-module-<your module name>`
|
||||
- Naming convention: `_pay-respects-module-<priority>-<your module name>`
|
||||
- **Fallback module**: Will only be run if no previous suggestion were found
|
||||
- **CAUTION**: Will immediately return if a suggestion is obtained, and there is no guaranteed the modules are executed in a specific order.
|
||||
- Naming convention: `_pay-respects-fallback-<your module name>`
|
||||
- **CAUTION**: Will immediately return if a suggestion is obtained
|
||||
- Naming convention: `_pay-respects-fallback-<priority>-<your module name>`
|
||||
|
||||
Priority is used to retrieve suggestions in a specific order by an [unstable sort](https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable) (although they will always be after compile-time matches). Default modules have a priority of `100`.
|
||||
|
||||
When running your module, you will get the following environment variables:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue