Skip to content

Commit

Permalink
Remove blank lines
Browse files Browse the repository at this point in the history
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
  • Loading branch information
MauriceVanVeen committed Sep 11, 2024
1 parent 70bb0c5 commit 939ab57
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,42 +108,35 @@ type StreamConfig struct {
// all values copied.
func (cfg *StreamConfig) clone() *StreamConfig {
clone := *cfg

if cfg.Placement != nil {
placement := *cfg.Placement
clone.Placement = &placement
}

if cfg.Mirror != nil {
mirror := *cfg.Mirror
clone.Mirror = &mirror
}

if len(cfg.Sources) > 0 {
clone.Sources = make([]*StreamSource, len(cfg.Sources))
for i, cfgSource := range cfg.Sources {
source := *cfgSource
clone.Sources[i] = &source
}
}

if cfg.SubjectTransform != nil {
transform := *cfg.SubjectTransform
clone.SubjectTransform = &transform
}

if cfg.RePublish != nil {
rePublish := *cfg.RePublish
clone.RePublish = &rePublish
}

if cfg.Metadata != nil {
clone.Metadata = make(map[string]string, len(cfg.Metadata))
for k, v := range cfg.Metadata {
clone.Metadata[k] = v
}
}

return &clone
}

Expand Down

0 comments on commit 939ab57

Please sign in to comment.