func loadWire(r *gocuc.Runner) error { wire_root := "features/step_definitions/" files, err := ioutil.ReadDir(wire_root) if err != nil { return err } for _, f := range files { matched, _ := filepath.Match("*.wire", f.Name()) if matched { return r.LoadWire(wire_root + f.Name()) } } return fmt.Errorf("No wire file found") }