summaryrefslogtreecommitdiff
path: root/argv.Match.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-21 15:48:24 -0500
committerJeff Carr <[email protected]>2025-10-21 15:48:24 -0500
commit2b6414a664fd7ccc519874f4d0b55a12a871307c (patch)
treeb72eba5a53e98a219f4a54249241e2fd9b66e6d8 /argv.Match.go
parente9c3000abafd70702cb9db6e3738115012f498eb (diff)
housecleaning
Diffstat (limited to 'argv.Match.go')
-rw-r--r--argv.Match.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/argv.Match.go b/argv.Match.go
new file mode 100644
index 0000000..e9670a7
--- /dev/null
+++ b/argv.Match.go
@@ -0,0 +1,21 @@
+package argvpb
+
+import "strings"
+
+func (pb *Argv) IsMatch(match string) bool {
+ parts := strings.Split(match, ".")
+ pb.Debugf("IsMatch() parts (%v)", parts)
+ for _, part := range parts {
+ var found bool
+ for _, v := range pb.Real {
+ if part == v {
+ found = true
+ }
+ }
+ if found {
+ continue
+ }
+ return false
+ }
+ return true
+}