func Init(sDefs []*SurfacerDef) ([]Surfacer, error) {
	// If no surfacers are defined, return default surfacers. This behavior
	// can be disabled by explicitly specifying "surfacer {}" in the config.
	if len(sDefs) == 0 {
		sDefs = defaultSurfacers
	}

	var result []Surfacer
	for _, sDef := range sDefs {
		if sDef.GetType() == Type_NONE {
			continue
		}
		s, err := initSurfacer(sDef)
		if err != nil {
			return nil, err
		}
		result = append(result, s)
	}
	return result, nil
}
// Init initializes the surfacers from the config protobufs and returns them as
// a list.
Init initializes the surfacers from the config protobufs and returns them as
a list.
// Init initializes the surfacers from the config protobufs and returns them as // a list .
func Init(sDefs []*SurfacerDef) ([]Surfacer, error) {
	if len(sDefs) == 0 {
		sDefs = defaultSurfacers
	}
	var result []Surfacer
	for _, sDef := range sDefs {
		if sDef.GetType() == Type_NONE {
			continue
		}
		s, err := initSurfacer(sDef)
		if err != nil {
			return nil, err
		}
		result = append(result, s)
	}
	return result, nil
}
func Init ( sDefs [ ] * SurfacerDef ) ( [ ] Surfacer , error ) { if len ( sDefs ) == 0 { sDefs = defaultSurfacers } var result [ ] Surfacer for _ , sDef := range sDefs { if sDef . GetType ( ) == Type_NONE { continue } s , err := initSurfacer ( sDef ) if err != nil { return nil , err } result = append ( result , s ) } return result , nil }
Init initializes the surfacers from the config protobufs and returns them as
a list.
Init initializes the surfacers from the config protobufs and returns them as a list .
// If no surfacers are defined, return default surfacers. This behavior // can be disabled by explicitly specifying "surfacer {}" in the config.