func Setup(dir string) (Config, error) {
	// We get the directory check for free form os.MkdirAll.
	if err := os.MkdirAll(dir, 0755); err != nil {
		return nil, err
	}

	return &fileConfig{
		Dir:      dir,
		Scores:   filepath.Join(dir, defaultScoreFile),
		Search:   filepath.Join(dir, defaultSearchFile),
		Pins:     filepath.Join(dir, defaultPinsFile),
		Settings: filepath.Join(dir, defaultSettingsFile),
	}, nil
}
// Setup setups the config folder from a directory path.
//
// If the directories don't already exists, they are created and if the score
// file is present, it is loaded.
Setup setups the config folder from a directory path.

If the directories don't already exists, they are created and if the score
file is present, it is loaded.
// Setup setups the config folder from a directory path . // // If the directories don ' t already exists they are created and if the score // file is present it is loaded .
func Setup(dir string) (Config, error) {
	if err := os.MkdirAll(dir, 0755); err != nil {
		return nil, err
	}
	return &fileConfig{
		Dir:      dir,
		Scores:   filepath.Join(dir, defaultScoreFile),
		Search:   filepath.Join(dir, defaultSearchFile),
		Pins:     filepath.Join(dir, defaultPinsFile),
		Settings: filepath.Join(dir, defaultSettingsFile),
	}, nil
}
func Setup ( dir string ) ( Config , error ) { if err := os . MkdirAll ( dir , 0755 ) ; err != nil { return nil , err } return & fileConfig { Dir : dir , Scores : filepath . Join ( dir , defaultScoreFile ) , Search : filepath . Join ( dir , defaultSearchFile ) , Pins : filepath . Join ( dir , defaultPinsFile ) , Settings : filepath . Join ( dir , defaultSettingsFile ) , } , nil }
Setup setups the config folder from a directory path.
Setup setups the config folder from a directory path .
// We get the directory check for free form os.MkdirAll.