func ReadOptionsFromFile(filename string) (Options, error) {
	res := DefaultOptions

	file, err := ioutil.ReadFile(filename)
	if err != nil {
		return res, err
	}

	err = json.Unmarshal([]byte(file), &res)
	if err != nil {
		return res, err
	}

	return res, res.Verify()
}
//ReadOptionsFromFile opens the provided JSON file and marshals the data
//into a Options object.
//Returns the results, and the first error encountered.
//The error is either validation error, or JSON encoding error.
ReadOptionsFromFile opens the provided JSON file and marshals the data
into a Options object.
Returns the results, and the first error encountered.
The error is either validation error, or JSON encoding error.
// ReadOptionsFromFile opens the provided JSON file and marshals the data // into a Options object . // Returns the results and the first error encountered . // The error is either validation error or JSON encoding error .
func ReadOptionsFromFile(filename string) (Options, error) {
	res := DefaultOptions
	file, err := ioutil.ReadFile(filename)
	if err != nil {
		return res, err
	}
	err = json.Unmarshal([]byte(file), &res)
	if err != nil {
		return res, err
	}
	return res, res.Verify()
}
func ReadOptionsFromFile ( filename string ) ( Options , error ) { res := DefaultOptions file , err := ioutil . ReadFile ( filename ) if err != nil { return res , err } err = json . Unmarshal ( [ ] byte ( file ) , & res ) if err != nil { return res , err } return res , res . Verify ( ) }
ReadOptionsFromFile opens the provided JSON file and marshals the data
into a Options object.
ReadOptionsFromFile opens the provided JSON file and marshals the data into a Options object .