From b4d81a966147052ce6b2edc1a4296a9bcf46708e Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Thu, 1 Oct 2020 20:04:04 -0400 Subject: [PATCH] Tables are cuter --- README.md | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index af82ab7f..e7f21f2d 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ core applications: https://status.twinnation.org/ - [Conditions](#conditions) - [Placeholders](#placeholders) - [Functions](#functions) - - [Length - len()](#length---len) - - [Pattern - pat()](#pattern---pat) - [Alerting](#alerting) - [Configuring Slack alerts](#configuring-slack-alerts) - [Configuring PagerDuty alerts](#configuring-pagerduty-alerts) @@ -146,30 +144,12 @@ Here are some examples of conditions you can use: #### Functions -##### Length - len() +| Function | Description | Example | +|:-----------|:---------------------------------------------------------------------------------------------------------------- |:-------------------------- | +| `len` | Returns the length of the object/slice. Works only with the `[BODY]` placeholder. | `len([BODY].username) > 8` +| `pat` | Specifies that the string passed as parameter should be evaluated as a pattern. Works only with `==` and `!=`. | `[IP] == pat(192.168.*)` -Returns the length of the object/slice. - -Example: -``` -len([BODY].username) > 8 -``` - -Works only with the `[BODY]` placeholder. - - -##### Pattern - pat() - -Specifies that the string passed as parameter should be evaluated as a pattern. - -Usage: -``` -[IP] == pat(192.168.*) -``` - -Works only with `==` and `!=` comparators. - -**NOTE**: Use patterns only when you need to. `[STATUS] == pat(2*)` is a lot more expensive than `[STATUS] < 300`. +**NOTE**: Use `pat` only when you need to. `[STATUS] == pat(2*)` is a lot more expensive than `[STATUS] < 300`.