Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

GetOptions seems to be returning default section options twice #22

Open
GoogleCodeExporter opened this issue Apr 26, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

See attached code which is simple program to walk the sections in a config file 
and list the options and their values for each section.

What is the expected output? What do you see instead?

Would expect to see the section name (default) followed by one line for the one 
option and value. Instead see two duplicate lines of the same option and value. 
Looking at the GetOptions source code, it looks like this may be intended, but 
it would not be what I would expect.

What version of the product are you using? On what operating system?

Current (May 8, 2012) of goconf, Go v1.0.2 on Windows 7 64-bit.

Please provide any additional information below.

See attached file for source code to reproduce. Note that if a config file 
doesn't exist it creates one first (also attached). Also note that even if you 
remove the section name [default] from the config file GetOptions still returns 
the host option name twice.

Original issue reported on code.google.com by jim.lehmer on 23 Sep 2012 at 6:52

Attachments:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant