github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/appfile/detect/detect.go (about) 1 package detect 2 3 // App will detect the application type for the given directory. 4 func App(dir string, c *Config) (string, error) { 5 for _, d := range c.Detectors { 6 check, err := d.Detect(dir) 7 if err != nil { 8 return "", err 9 } 10 11 if check { 12 return d.Type, nil 13 } 14 } 15 16 return "", nil 17 }