Skip to content

Commit 9fbc2cf

Browse files
committed
ref: remove unused utils
1 parent f8476a1 commit 9fbc2cf

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed

internal/provider/utils.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ package provider
22

33
import (
44
"fmt"
5-
"regexp"
65
"strings"
76
)
87

9-
func Pointer[T any](v T) *T {
10-
return &v
11-
}
12-
138
func BuildTwoPartId(a, b string) string {
149
return fmt.Sprintf("%s/%s", a, b)
1510
}
@@ -33,17 +28,3 @@ func SplitThreePartId(id, a, b, c string) (string, string, string, error) {
3328
}
3429
return parts[0], parts[1], parts[2], nil
3530
}
36-
37-
func MaskToRegex(mask string) string {
38-
// Escape special regex characters in the mask
39-
escapedMask := regexp.QuoteMeta(mask)
40-
// Replace \* (escaped asterisks) with .* (regex pattern for any character sequence)
41-
regexPattern := strings.ReplaceAll(escapedMask, "\\*", ".*")
42-
return "^" + regexPattern + "$" // Ensure the pattern matches the entire string
43-
}
44-
45-
func MatchStringWithMask(target, mask string) bool {
46-
regexPattern := MaskToRegex(mask)
47-
regex := regexp.MustCompile(regexPattern)
48-
return regex.MatchString(target)
49-
}

internal/provider/utils_test.go

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)