efair / goconf

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

require build on new go #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. build on r57

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

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

Please provide any additional information below.
my workable patch is here
--- a/Makefile  Sun Aug 22 06:17:36 2010 -0400
+++ b/Makefile  Thu Jun 09 11:58:15 2011 +0800
@@ -1,4 +1,4 @@
-include $(GOROOT)/src/Make.$(GOARCH)
+include $(GOROOT)/src/Make.inc

 TARG=conf
 GOFILES=\
diff -r b3f4e5735324 get.go
--- a/get.go    Sun Aug 22 06:17:36 2010 -0400
+++ b/get.go    Thu Jun 09 11:58:15 2011 +0800
@@ -159,12 +159,12 @@

 // GetFloat has the same behaviour as GetString but converts the response to float.
-func (c *ConfigFile) GetFloat(section string, option string) (value float, err 
os.Error) {
+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.Atof(sv)
+       value, err = strconv.Atof32(sv)
        if err != nil {
-           err = GetError{CouldNotParse, "float", sv, section, option}
+           err = GetError{CouldNotParse, "float32", sv, section, option}
        }
    }

diff -r b3f4e5735324 read.go
--- a/read.go   Sun Aug 22 06:17:36 2010 -0400
+++ b/read.go   Thu Jun 09 11:58:15 2011 +0800
@@ -13,7 +13,7 @@
 func ReadConfigFile(fname string) (c *ConfigFile, err os.Error) {
    var file *os.File

-   if file, err = os.Open(fname, os.O_RDONLY, 0); err != nil {
+   if file, err = os.Open(fname); err != nil {
        return nil, err
    }

diff -r b3f4e5735324 write.go
--- a/write.go  Sun Aug 22 06:17:36 2010 -0400
+++ b/write.go  Thu Jun 09 11:58:15 2011 +0800
@@ -12,7 +12,7 @@
 func (c *ConfigFile) WriteConfigFile(fname string, perm uint32, header string) (err os.Error) {
    var file *os.File

-   if file, err = os.Open(fname, os.O_WRONLY|os.O_CREAT|os.O_TRUNC, perm); err 
!= nil {
+   if file, err = os.Create(fname); err != nil {
        return err
    }
    if err = c.Write(file, header); err != nil {

Original issue reported on code.google.com by dlin...@gmail.com on 9 Jun 2011 at 4:00

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