diff --git a/src/services/project/project_test.go b/src/services/project/project_test.go index 74e6a55..5e7af51 100644 --- a/src/services/project/project_test.go +++ b/src/services/project/project_test.go @@ -24,13 +24,7 @@ func TestDetectType(t *testing.T) { test_proj_type := Project{Name: string(project_type), Directory: path.Join(root, props["directory"])} - var proj_type ProjectType - var err error - if test_proj_type.Language == "auto" { - proj_type, err = test_proj_type.detectType() - } else { - proj_type, err = test_proj_type.matchType() - } + proj_type, err := test_proj_type.detectType() // if we cannot autodetect a project we will return an error if project_type == "invalid" && err != nil {