~ci-train-bot/ubuntu-push/ubuntu-push-ubuntu-yakkety-2021

« back to all changes in this revision

Viewing changes to config/config.go

  • Committer: john.lenton at canonical
  • Date: 2014-03-20 12:15:47 UTC
  • mfrom: (81 ubuntu-push)
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: john.lenton@canonical.com-20140320121547-i544is8492ulfykx
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
}
96
96
 
97
97
// ReadConfig reads a JSON configuration into destConfig which should
98
 
// be a pointer to a structure, it does some more configuration
99
 
// specific error checking than plain JSON decoding and mentions
100
 
// fields in errors . Configuration fields are expected to start with
101
 
// lower case in the JSON object.
 
98
// be a pointer to a structure. It does some more configuration
 
99
// specific error checking than plain JSON decoding, and mentions
 
100
// fields in errors. Configuration fields in the JSON object are
 
101
// expected to start with lower case.
102
102
func ReadConfig(r io.Reader, destConfig interface{}) error {
103
103
        destValue, err := checkDestConfig(destConfig)
104
104
        if err != nil {
182
182
        return uint(cqs)
183
183
}
184
184
 
185
 
// LoadFile reads  a file possibly relative to a base dir.
 
185
// LoadFile reads a file possibly relative to a base dir.
186
186
func LoadFile(p, baseDir string) ([]byte, error) {
187
187
        if p == "" {
188
188
                return nil, nil