We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62b3e8b + 1c346e3 commit aebfab6Copy full SHA for aebfab6
adapters/syslog/syslog.go
@@ -267,3 +267,8 @@ func (m *Message) Timestamp() string {
267
func (m *Message) ContainerName() string {
268
return m.Message.Container.Name[1:]
269
}
270
+
271
+// ContainerNameSplitN returns the message's container name sliced at most "n" times using "sep"
272
+func (m *Message) ContainerNameSplitN(sep string, n int) []string {
273
+ return strings.SplitN(m.ContainerName(), sep, n)
274
+}
0 commit comments