From faf971f364888f665296bc56dc40605461f631c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A1=D1=8B=D1=81?= =?UTF-8?q?=D0=BE=D0=B5=D0=B2?= Date: Sun, 31 Dec 2023 16:18:58 +0800 Subject: [PATCH] Adds documentation for macro arguments --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 98477c4..210c5f3 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,23 @@ macro: - `repeat 5 send {"ping": 1}` repeat provided command or macro defined number of times - `sleep 1` sleeps for the provided number of seconds +### Macros arguments + +Macro support [Go template language](https://pkg.go.dev/text/template). It provides a possibility to pass arguments to your macro command and substitute or adjust the behavior of your macro commands. + +``` +version: "1" +domains: + - example.com +macro: + authorize: + - |- + send { + "authorize": "{{index .Args 0}}", + } + - wait 2 +``` + ### Macros presets - [Deriv API](https://github.com/ksysoev/wsget-deriv-api)