@@ -62,7 +62,7 @@ func (p *Pipeline) Start() error {
6262 // Start inputs
6363 for _ , input := range p .inputs {
6464 if err := input .Start (); err != nil {
65- return fmt .Errorf ("failed to start input: %s " , err )
65+ return fmt .Errorf ("failed to start input: %w " , err )
6666 }
6767 // Start background process to send input events to combined filter channel
6868 go p .chanCopyLoop (input .OutputChan (), p .filterChan )
@@ -72,7 +72,7 @@ func (p *Pipeline) Start() error {
7272 // Start filters
7373 for idx , filter := range p .filters {
7474 if err := filter .Start (); err != nil {
75- return fmt .Errorf ("failed to start input: %s " , err )
75+ return fmt .Errorf ("failed to start input: %w " , err )
7676 }
7777 if idx == 0 {
7878 // Start background process to send events from combined filter channel to first filter plugin
@@ -96,7 +96,7 @@ func (p *Pipeline) Start() error {
9696 // Start outputs
9797 for _ , output := range p .outputs {
9898 if err := output .Start (); err != nil {
99- return fmt .Errorf ("failed to start output: %s " , err )
99+ return fmt .Errorf ("failed to start output: %w " , err )
100100 }
101101 // Start background error listener
102102 go p .errorChanWait (output .ErrorChan ())
@@ -114,13 +114,13 @@ func (p *Pipeline) Stop() error {
114114 // Stop inputs
115115 for _ , input := range p .inputs {
116116 if err := input .Stop (); err != nil {
117- return fmt .Errorf ("failed to stop input: %s " , err )
117+ return fmt .Errorf ("failed to stop input: %w " , err )
118118 }
119119 }
120120 // Stop outputs
121121 for _ , output := range p .outputs {
122122 if err := output .Stop (); err != nil {
123- return fmt .Errorf ("failed to stop output: %s " , err )
123+ return fmt .Errorf ("failed to stop output: %w " , err )
124124 }
125125 }
126126 return nil
0 commit comments