Add possiblity to limit actions to tagged or named repository

This commit is contained in:
Mikołaj Pęczkowski 2021-11-07 14:05:45 +01:00
parent 5c98ab6554
commit 23e4547e52
11 changed files with 345 additions and 24 deletions

View file

@ -1,7 +1,6 @@
package config
import (
"errors"
"fmt"
"strconv"
"strings"
@ -12,6 +11,7 @@ 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 {
@ -21,7 +21,5 @@ func getDuplicateFieldError(field string, name string, rows []int) error {
rowsInString = append(rowsInString, strconv.Itoa(row))
}
errorMessage := fmt.Sprintf("The %v \"%v\" is duplicated in rows: %v", field, name, strings.Join(rowsInString, ","))
return errors.New(errorMessage)
return fmt.Errorf("the %v \"%v\" is duplicated in rows: %v", field, name, strings.Join(rowsInString, ","))
}