Fixed issue 7
This commit is contained in:
parent
bd314801c3
commit
63d75cbe77
2
get.go
2
get.go
|
@ -116,7 +116,7 @@ func (c *ConfigFile) GetString(section string, option string) (value string, err
|
|||
var i int
|
||||
|
||||
for i = 0; i < DepthValues; i++ { // keep a sane depth
|
||||
vr := varRegExp.ExecuteString(value)
|
||||
vr := varRegExp.FindString(value)
|
||||
if len(vr) == 0 {
|
||||
break
|
||||
}
|
||||
|
|
2
write.go
2
write.go
|
@ -9,7 +9,7 @@ import (
|
|||
// WriteConfigFile saves the configuration representation to a file.
|
||||
// The desired file permissions must be passed as in os.Open.
|
||||
// The header is a string that is saved as a comment in the first line of the file.
|
||||
func (c *ConfigFile) WriteConfigFile(fname string, perm int, header string) (err os.Error) {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue