// NewImapConfig creates new configuration from a JSON file
NewImapConfig creates new configuration from a JSON file
// NewImapConfig creates new configuration from a JSON file
func NewImapConfig(filename string) (*ImapConfig, error) {
	file, err := os.Open(filename)
	if err != nil {
		return nil, err
	}
	defer file.Close()
	decoder := json.NewDecoder(file)
	conf := ImapConfig{}
	err = decoder.Decode(&conf)
	return &conf, err
}
func NewImapConfig ( filename string ) ( * ImapConfig , error ) { file , err := os . Open ( filename ) if err != nil { return nil , err } defer file . Close ( ) decoder := json . NewDecoder ( file ) conf := ImapConfig { } err = decoder . Decode ( & conf ) return & conf , err }
NewImapConfig creates new configuration from a JSON file
NewImapConfig creates new configuration from a JSON file