Skip to content

Commit

Permalink
added FullKeyPath to allow zero allocation function
Browse files Browse the repository at this point in the history
  • Loading branch information
val06 committed Oct 18, 2024
1 parent 6ed1efb commit eb15a2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/system-probe/config/ns.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,16 @@ func evNS(k ...string) string {
return NSkey("event_monitoring_config", k...)
}

// NSkey returns a full key path in the config file by joining multiple path fragments
// NSkey returns a full key path in the config file by joining the given namespace and the rest of the path fragments
func NSkey(ns string, pieces ...string) string {
return strings.Join(append([]string{ns}, pieces...), ".")
}

// FullKeyPath returns a full key path in the config file by joining multiple path fragments
func FullKeyPath(pieces ...string) string {
return strings.Join(pieces, ".")
}

// wcdNS addes 'windows_crash_detection' namespace to config key
func wcdNS(k ...string) string {
return NSkey("windows_crash_detection", k...)
Expand Down

0 comments on commit eb15a2e

Please sign in to comment.