func (config *ServiceConfig) NewIndexInfo(indexName string) (*IndexInfo, error) {
	var err error
	indexName, err = ValidateIndexName(indexName)
	if err != nil {
		return nil, err
	}

	// Return any configured index info, first.
	if index, ok := config.IndexConfigs[indexName]; ok {
		return index, nil
	}

	// Construct a non-configured index info.
	index := &IndexInfo{
		Name:     indexName,
		Mirrors:  make([]string, 0),
		Official: false,
	}
	index.Secure = config.isSecureIndex(indexName)
	return index, nil
}
// NewIndexInfo returns IndexInfo configuration from indexName
NewIndexInfo returns IndexInfo configuration from indexName
// NewIndexInfo returns IndexInfo configuration from indexName
func (config *ServiceConfig) NewIndexInfo(indexName string) (*IndexInfo, error) {
	var err error
	indexName, err = ValidateIndexName(indexName)
	if err != nil {
		return nil, err
	}
	if index, ok := config.IndexConfigs[indexName]; ok {
		return index, nil
	}
	index := &IndexInfo{
		Name:     indexName,
		Mirrors:  make([]string, 0),
		Official: false,
	}
	index.Secure = config.isSecureIndex(indexName)
	return index, nil
}
func ( config * ServiceConfig ) NewIndexInfo ( indexName string ) ( * IndexInfo , error ) { var err error indexName , err = ValidateIndexName ( indexName ) if err != nil { return nil , err } if index , ok := config . IndexConfigs [ indexName ] ; ok { return index , nil } index := & IndexInfo { Name : indexName , Mirrors : make ( [ ] string , 0 ) , Official : false , } index . Secure = config . isSecureIndex ( indexName ) return index , nil }
NewIndexInfo returns IndexInfo configuration from indexName
NewIndexInfo returns IndexInfo configuration from indexName
// Return any configured index info, first. // Construct a non-configured index info.