gvsurenderreddy / goconf

Automatically exported from code.google.com/p/goconf
0 stars 0 forks source link

Doesn't compile on the latest release #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. goinstall goconf.googlecode.com/hg
2.
3.

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

An installed package

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

Linux, amd64, 6g version 7188 release.2011-01-20 release

Please provide any additional information below.

6g -o _go_.6 get.go conf.go write.go read.go 
get.go:162: undefined: float
get.go:165: undefined: strconv.Atof
make: *** [_go_.6] Error 1
--- exit status 2
goinstall: installing goconf.googlecode.com/hg: running gomake: exit status 2

Original issue reported on code.google.com by kim.lundgren on 20 Jan 2011 at 6:38

GoogleCodeExporter commented 8 years ago
"float" has been removed. See http://codereview.appspot.com/4071041

Original comment by kortda...@gmail.com on 20 Jan 2011 at 8:05

GoogleCodeExporter commented 8 years ago
Work around would be editing get.go yourself. Change the GetFloat function at 
line 162 in get.go with the following:

{{{
// GetFloat has the same behaviour as GetString but converts the response to 
float.
func (c *ConfigFile) GetFloat(section string, option string) (value float32, 
err os.Error) {
    sv, err := c.GetString(section, option)
    if err == nil {
        value, err = strconv.Atof32(sv)
        if err != nil {
            err = GetError{CouldNotParse, "float", sv, section, option}
        }
    }

    return value, err
}
}}}

Original comment by kortda...@gmail.com on 20 Jan 2011 at 11:11

GoogleCodeExporter commented 8 years ago
patched in http://code.google.com/r/sorosj-goconf/
I used float64 so it will be big enough for any float you'd want

Original comment by sor...@gmail.com on 23 Jan 2011 at 7:33

GoogleCodeExporter commented 8 years ago
The attached patch fixes the issue.

Original comment by sascha@peilicke.de on 18 May 2011 at 12:11

Attachments:

GoogleCodeExporter commented 8 years ago
Attached patch has fixes for additional changes to the "os" package.

Please apply!

Original comment by alecatho...@gmail.com on 4 Jun 2011 at 3:05

Attachments:

GoogleCodeExporter commented 8 years ago
Additionally, I understand how maintaining a package can get a bit onerous, but 
if you considered moving this to GitHub it will become a lot easier to accept 
contributions.

Original comment by alecatho...@gmail.com on 4 Jun 2011 at 3:08

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 2eb26b86ef3e.

Original comment by step...@q5comm.com on 27 Jun 2011 at 3:04