mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	The name cmd is already used in many places and may cause conflicts, so I chose `gitcmd` instead to minimize potential naming conflicts.
		
			
				
	
	
		
			15 lines
		
	
	
		
			321 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			321 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2025 The Gitea Authors. All rights reserved.
 | 
						|
// SPDX-License-Identifier: MIT
 | 
						|
 | 
						|
package gitcmd
 | 
						|
 | 
						|
import "fmt"
 | 
						|
 | 
						|
// ConcatenateError concatenats an error with stderr string
 | 
						|
func ConcatenateError(err error, stderr string) error {
 | 
						|
	if len(stderr) == 0 {
 | 
						|
		return err
 | 
						|
	}
 | 
						|
	return fmt.Errorf("%w - %s", err, stderr)
 | 
						|
}
 |