mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-20 20:24:22 -04:00
AB#2033 Remove redundant "failed" in error wrapping
Remove "failed" from wrapped errors Where appropriate rephrase "unable to/could not" to "failed" in root errors Start error log messages with "Failed"
This commit is contained in:
parent
0c9ca50be8
commit
9441e46e4b
56 changed files with 204 additions and 204 deletions
|
@ -53,11 +53,11 @@ func GetIPAddr() (string, error) {
|
|||
func GetInterfaceIP(netInterface string) (string, error) {
|
||||
netif, err := net.InterfaceByName(netInterface)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("could not find interface %s: %w", netInterface, err)
|
||||
return "", fmt.Errorf("finding interface %s: %w", netInterface, err)
|
||||
}
|
||||
addrs, err := netif.Addrs()
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("could not retrieve interface ip addresses %s: %w", netInterface, err)
|
||||
return "", fmt.Errorf("retrieving interface ip addresses %s: %w", netInterface, err)
|
||||
}
|
||||
for _, addr := range addrs {
|
||||
if ipn, ok := addr.(*net.IPNet); ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue