Remove check duplicate same path
This commit is contained in:
parent
e68331b6d1
commit
66285048cc
3
utils.go
3
utils.go
@ -43,9 +43,6 @@ func split(args, fields []string) []string {
|
|||||||
// Duplicates check projects with same name or same combinations of main/path
|
// Duplicates check projects with same name or same combinations of main/path
|
||||||
func duplicates(value Project, arr []Project) (Project, error) {
|
func duplicates(value Project, arr []Project) (Project, error) {
|
||||||
for _, val := range arr {
|
for _, val := range arr {
|
||||||
if value.Path == val.Path {
|
|
||||||
return val, errors.New("There is already a project with path '" + val.Path + "'. Check your config file!")
|
|
||||||
}
|
|
||||||
if value.Name == val.Name {
|
if value.Name == val.Name {
|
||||||
return val, errors.New("There is already a project with name '" + val.Name + "'. Check your config file!")
|
return val, errors.New("There is already a project with name '" + val.Name + "'. Check your config file!")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user