package config import ( "fmt" "strconv" "strings" ) const ( errNotSupportedType = "not supported configuration type" errMissingWorkspaceField = "missing required \"workspace\" field" errMissingSrcField = "missing required field the \"src\" in row %v" errNameAndTagsTogether = "name and tags arguments connot be used together" ) func getDuplicateFieldError(field string, name string, rows []int) error { var rowsInString []string for _, row := range rows { rowsInString = append(rowsInString, strconv.Itoa(row)) } return fmt.Errorf("the %v \"%v\" is duplicated in rows: %v", field, name, strings.Join(rowsInString, ",")) }