Skip to content

Commit 15ef84b

Browse files
authored
Corrects usage of Trim Prefix/Suffix. (#748)
* Corrects usage of Trim Prefix/Suffix. Resolves #747 Signed-off-by: Pete Lumbis <[email protected]> * Corrects usage of Trim Prefix/Suffix. Resolves #747 Signed-off-by: Pete Lumbis <[email protected]> * Fix TrimSuffix link Signed-off-by: Pete Lumbis <[email protected]> * correct link formatting Signed-off-by: Pete Lumbis <[email protected]> --------- Signed-off-by: Pete Lumbis <[email protected]>
1 parent c347076 commit 15ef84b

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

content/master/concepts/patch-and-transform.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,10 +1629,11 @@ patches:
16291629

16301630
#### Trim prefix
16311631

1632-
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
1633-
the matching string and all preceding characters.
1632+
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
1633+
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
1634+
from the beginning of a line.
16341635

1635-
```yaml {label="typeRegex"}
1636+
```yaml {label="typeTrimP"}
16361637
patches:
16371638
- type: FromCompositeFieldPath
16381639
fromFieldPath: spec.desiredRegion
@@ -1646,10 +1647,11 @@ patches:
16461647

16471648
#### Trim suffix
16481649

1649-
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
1650-
the matching string and all proceeding characters.
1650+
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
1651+
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
1652+
from the end of a line.
16511653

1652-
```yaml {label="typeRegex"}
1654+
```yaml {label="typeTrimS"}
16531655
patches:
16541656
- type: FromCompositeFieldPath
16551657
fromFieldPath: spec.desiredRegion

content/v1.13/concepts/patch-and-transform.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,10 +1554,11 @@ patches:
15541554

15551555
#### Trim prefix
15561556

1557-
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
1558-
the matching string and all preceding characters.
1557+
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
1558+
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
1559+
from the beginning of a line.
15591560

1560-
```yaml {label="typeRegex"}
1561+
```yaml {label="typeTrimP"}
15611562
patches:
15621563
- type: FromCompositeFieldPath
15631564
fromFieldPath: spec.desiredRegion
@@ -1571,10 +1572,11 @@ patches:
15711572

15721573
#### Trim suffix
15731574

1574-
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
1575-
the matching string and all proceeding characters.
1575+
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
1576+
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
1577+
from the end of a line.
15761578

1577-
```yaml {label="typeRegex"}
1579+
```yaml {label="typeTrimS"}
15781580
patches:
15791581
- type: FromCompositeFieldPath
15801582
fromFieldPath: spec.desiredRegion

content/v1.14/concepts/patch-and-transform.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,10 +1609,11 @@ patches:
16091609

16101610
#### Trim prefix
16111611

1612-
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
1613-
the matching string and all preceding characters.
1612+
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
1613+
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
1614+
from the beginning of a line.
16141615

1615-
```yaml {label="typeRegex"}
1616+
```yaml {label="typeTrimP"}
16161617
patches:
16171618
- type: FromCompositeFieldPath
16181619
fromFieldPath: spec.desiredRegion
@@ -1626,10 +1627,11 @@ patches:
16261627

16271628
#### Trim suffix
16281629

1629-
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
1630-
the matching string and all proceeding characters.
1630+
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
1631+
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
1632+
from the end of a line.
16311633

1632-
```yaml {label="typeRegex"}
1634+
```yaml {label="typeTrimS"}
16331635
patches:
16341636
- type: FromCompositeFieldPath
16351637
fromFieldPath: spec.desiredRegion

content/v1.15/concepts/patch-and-transform.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,10 +1629,11 @@ patches:
16291629

16301630
#### Trim prefix
16311631

1632-
The {{<hover label="typeRegex" line="8">}}type: TrimPrefix{{</hover>}} removes
1633-
the matching string and all preceding characters.
1632+
The {{<hover label="typeTrimP" line="8">}}type: TrimPrefix{{</hover>}} uses
1633+
Go's [TrimPrefix](https://pkg.go.dev/strings#TrimPrefix) and removes characters
1634+
from the beginning of a line.
16341635

1635-
```yaml {label="typeRegex"}
1636+
```yaml {label="typeTrimP"}
16361637
patches:
16371638
- type: FromCompositeFieldPath
16381639
fromFieldPath: spec.desiredRegion
@@ -1646,10 +1647,11 @@ patches:
16461647

16471648
#### Trim suffix
16481649

1649-
The {{<hover label="typeRegex" line="8">}}type: TrimSuffix{{</hover>}} removes
1650-
the matching string and all proceeding characters.
1650+
The {{<hover label="typeTrimS" line="8">}}type: TrimSuffix{{</hover>}} uses
1651+
Go's [TrimSuffix](https://pkg.go.dev/strings#TrimSuffix) and removes characters
1652+
from the end of a line.
16511653

1652-
```yaml {label="typeRegex"}
1654+
```yaml {label="typeTrimS"}
16531655
patches:
16541656
- type: FromCompositeFieldPath
16551657
fromFieldPath: spec.desiredRegion

0 commit comments

Comments
 (0)