gitlab.com/evatix-go/core@v1.3.55/errcore/ErrorToSplitLines.go (about)

     1  package errcore
     2  
     3  import (
     4  	"strings"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  func ErrorToSplitLines(err error) []string {
    10  	if err == nil {
    11  		return []string{}
    12  	}
    13  
    14  	return strings.Split(
    15  		err.Error(),
    16  		constants.NewLineUnix)
    17  }