Corrects usage of Trim Prefix/Suffix. (#748)

* Corrects usage of Trim Prefix/Suffix. Resolves #747

Signed-off-by: Pete Lumbis <pete@upbound.io>

* Corrects usage of Trim Prefix/Suffix. Resolves #747

Signed-off-by: Pete Lumbis <pete@upbound.io>

* Fix TrimSuffix link

Signed-off-by: Pete Lumbis <pete@upbound.io>

* correct link formatting

Signed-off-by: Pete Lumbis <pete@upbound.io>

---------

Signed-off-by: Pete Lumbis <pete@upbound.io>
This commit is contained in:
Pete Lumbis 2024-04-11 13:55:06 -04:00 committed by GitHub
parent c34707678e
commit 15ef84b9bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 24 deletions

View File

@ -1629,10 +1629,11 @@ patches:
#### Trim prefix
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
the matching string and all preceding characters.
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
from the beginning of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimP"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion
@ -1646,10 +1647,11 @@ patches:
#### Trim suffix
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
the matching string and all proceeding characters.
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
from the end of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimS"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion

View File

@ -1554,10 +1554,11 @@ patches:
#### Trim prefix
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
the matching string and all preceding characters.
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
from the beginning of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimP"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion
@ -1571,10 +1572,11 @@ patches:
#### Trim suffix
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
the matching string and all proceeding characters.
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
from the end of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimS"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion

View File

@ -1609,10 +1609,11 @@ patches:
#### Trim prefix
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
the matching string and all preceding characters.
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
from the beginning of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimP"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion
@ -1626,10 +1627,11 @@ patches:
#### Trim suffix
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
the matching string and all proceeding characters.
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
from the end of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimS"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion

View File

@ -1629,10 +1629,11 @@ patches:
#### Trim prefix
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
the matching string and all preceding characters.
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
from the beginning of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimP"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion
@ -1646,10 +1647,11 @@ patches:
#### Trim suffix
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
the matching string and all proceeding characters.
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
from the end of a line.
```yaml {label="typeRegex"}
```yaml {label="typeTrimS"}
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.desiredRegion