Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to fix linting issues #930

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions docs/gossfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -918,12 +918,11 @@ Available functions:
`toUpper`
: Changes piped input to UPPERCASE


`findStringSubmatch regex string`
: Returns map[string]interface{} with the names of the parenthesized subexpressions, like `(?P<first>[a-z])`

{{ $regexDBrc := "\\'mysql:\\/\\/(?P<login>[a-z0-9]+):(?P<password>[a-z0-9]+)@localhost\\/(?P<database>roundcube_[a-z0-9]+)\\';"}}

{{ $rcConf := readFile /home/user/roundcube/config.inc.php | findStringSubmatch $regexDBrc }}
{{ $UserDBrc := get $rcConf "login" }}
{{ $PassDBrc := get $rcConf "password" }}
Expand All @@ -932,17 +931,14 @@ Available functions:
If not exists named parenthesized subexps, returns stringfied array string:

{{ $regexDBrc := "\\'mysql:\\/\\/([a-z0-9]+):([a-z0-9]+)@localhost\\/(roundcube_[a-z0-9]+)\\';"}}

{{ $rcConf := readFile /home/user/roundcube/config.inc.php | findStringSubmatch $regexDBrc }}
{{ $UserDBrc := get $rcConf "1" }}
{{ $PassDBrc := get $rcConf "2" }}
{{ $DBrc := get $rcConf "3" }}

NOTE: stringfied string array begins with "1" ("0" is all the string matched)




!!! warning

gossfiles containing text/template `{{}}` controls will no longer work with `goss add/autoadd`.
Expand Down
Loading