code: func peerChannelConfigHookFunc() mapstructure.DecodeHookFunc {
  	return func(
  		f reflect.Type,
  		t reflect.Type,
  		data interface{}) (interface{}, error) {
  
  		//Run through each PeerChannelConfig, create empty config map if value is nil
  		if t == reflect.TypeOf(map[string]PeerChannelConfig{}) {
  			dataMap, ok := data.(map[string]interface{})
  			if ok {
  				for k, v := range dataMap {
  					if v == nil {
  						// Make an empty map. It will be filled in with defaults
  						// in other hook below
  						dataMap[k] = make(map[string]interface{})
  					}
  				}
  				return dataMap, nil
  			}
  		}
  
  		//If target is of type 'fab.PeerChannelConfig', fill in defaults if not already specified
  		if t == reflect.TypeOf(PeerChannelConfig{}) {
  			dataMap, ok := data.(map[string]interface{})
  			if ok {
  				setDefault(dataMap, "endorsingpeer", true)
  				setDefault(dataMap, "chaincodequery", true)
  				setDefault(dataMap, "ledgerquery", true)
  				setDefault(dataMap, "eventsource", true)
  
  				return dataMap, nil
  			}
  		}
  
  		return data, nil
  	}
  }
docs: //peerChannelConfigHookFunc returns hook function for unmarshalling 'fab.PeerChannelConfig'
  // Rule : default set to 'true' if not provided in config