organized api packages into a unified constructor
This commit is contained in:
@@ -29,12 +29,17 @@ func NewUpdateNotificationPublisher(
|
||||
}
|
||||
}
|
||||
|
||||
// Trim produces an *UpdateNotificationPublisher with the pathPattern
|
||||
// trimmed from events otherwise published by p.
|
||||
func (p *UpdateNotificationPublisher) Trim(pathPattern string) *UpdateNotificationPublisher {
|
||||
p2 := *p
|
||||
p2.trimBasePath = path.Join(p2.trimBasePath, pathPattern)
|
||||
return &p2
|
||||
}
|
||||
|
||||
// Group produces an *UpdateNotificationPublisher with the pathPattern
|
||||
// appended to the base path used by p, if any, in publishing events.
|
||||
// If no base path was set to p, then pathPattern becomes the base path.
|
||||
func (p *UpdateNotificationPublisher) Group(pathPattern string) *UpdateNotificationPublisher {
|
||||
p2 := *p
|
||||
p2.basePathPattern = path.Join(p2.basePathPattern, pathPattern)
|
||||
|
||||
Reference in New Issue
Block a user