mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
allow comments in config file
This commit is contained in:
+3
-1
@@ -6,6 +6,8 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/DisposaBoy/JsonConfigReader"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConfigStructure is structure of main configuration
|
// ConfigStructure is structure of main configuration
|
||||||
@@ -192,7 +194,7 @@ func LoadConfig(filename string, config *ConfigStructure) error {
|
|||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
|
|
||||||
dec := json.NewDecoder(f)
|
dec := json.NewDecoder(JsonConfigReader.New(f))
|
||||||
return dec.Decode(&config)
|
return dec.Decode(&config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user