forked from longhorn/longhorn-manager
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(v2 upgrade/webhook): introduce global lock for data engine upgra…
…de resources Only allow one active dataEngineUpgradeManager and one active nodeDataEngineUppgrade at the same time. Longhorn 9104 Signed-off-by: Derek Su <[email protected]>
- Loading branch information
Showing
7 changed files
with
140 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package types | ||
|
||
import ( | ||
"regexp" | ||
"strings" | ||
) | ||
|
||
func PascalToKebab(input string) string { | ||
// Use a regex to insert a hyphen before each uppercase letter, except the first one. | ||
re := regexp.MustCompile("([a-z])([A-Z])") | ||
hyphenated := re.ReplaceAllString(input, "$1-$2") | ||
|
||
// Convert the result to lowercase. | ||
return strings.ToLower(hyphenated) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters