Skip to content

Commit

Permalink
Update docs to fix linting issues (#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel authored Jun 16, 2024
1 parent a6451d2 commit 05c2ced
Showing 1 changed file with 3 additions and 7 deletions.
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

0 comments on commit 05c2ced

Please sign in to comment.