mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
439 B
18 lines
439 B
package rules
|
|
|
|
import (
|
|
"regexp"
|
|
"strconv"
|
|
)
|
|
|
|
func parseErrorDetails(err string) (string, int, int) {
|
|
re := regexp.MustCompile(`([^:]+):(\d+):(\d+): executing`)
|
|
matches := re.FindStringSubmatch(err)
|
|
if len(matches) < 4 {
|
|
return "", 0, 0 // Return default values if the format does not match
|
|
}
|
|
|
|
line, _ := strconv.Atoi(matches[2])
|
|
col, _ := strconv.Atoi(matches[3])
|
|
return matches[1], line, col
|
|
} |