~pkal/dirconf

7e2adf30246df90a6a3203dcb109439f3d6bf537 — Philip K 2 years ago 5067334
makde WriteSchema private
2 files changed, 2 insertions(+), 7 deletions(-)

M README.md
M dirconf.go
M README.md => README.md +0 -5
@@ 56,11 56,6 @@ doesn't recognise this:
  the file for the value should be found in, within the configuration
  directory.
  
The auxiliary method `WriteSchema`, which is called by `Parse` and
`ParseIn` by default, will write a file in the configuration directory
named `.schema`, that specifies all options. This can be parsed by
configuration editors, to give an overview of all possible options.

Legal
-----


M dirconf.go => dirconf.go +2 -2
@@ 41,7 41,7 @@ type PathOption interface {
// Conf is a list of Options, each which will be processed when parsed
type Conf []Option

func (c *Conf) WriteSchema(dir string) error {
func (c *Conf) writeSchema(dir string) error {
	file, err := os.OpenFile(filepath.Join(dir, schemaFile),
		os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0644)
	if err != nil {


@@ 84,7 84,7 @@ func (c *Conf) ParseIn(dir string) error {
		return err
	}

	err = c.WriteSchema(dir)
	err = c.writeSchema(dir)
	if err != nil {
		return err
	}