~pkal/dirconf

683d2daae5aa9a3c5d4b2720ccd4c7524b981a04 — Philip K 2 years ago fc0f070
simplified internal Conf structure
1 files changed, 1 insertions(+), 12 deletions(-)

M dirconf.go
M dirconf.go => dirconf.go +1 -12
@@ 19,22 19,11 @@ var (
// Conf represents an open directory configuration
type Conf struct {
	path string
	file *os.File
}

// Open a directory configuration object
func Open(path string) (*Conf, error) {
	var (
		conf = Conf{path: path}
		err  error
	)

	conf.file, err = os.Open(path)
	if err != nil {
		return nil, err
	}

	return &conf, nil
	return &Conf{path: path}, os.MkdirAll(path, os.ModePerm)
}

// OpenConf a directory configuration object while paying attention to