// defaultRanger returns the default Ranger for the given aesthetic.
// If aes is an axis aesthetic, it returns nil (since these Rangers
// are assigned at render time). If aes is unknown, it panics.
965922
func defaultRanger(aes string) Ranger {
	switch aes {
	case "x", "y":
		return nil

	case "stroke", "fill":
		return &defaultColorRanger{}

	case "opacity":
		return NewFloatRanger(0.1, 1)

	case "size":
		// Default to ranging between 1% and 10% of the
		// minimum plot dimension.
		return NewFloatRanger(0.01, 0.1)
	}

	panic(fmt.Sprintf("unknown aesthetic %q", aes))
}
242965
func DefaultRouter(spec *loads.Document, api RoutableAPI) Router {
	builder := newDefaultRouteBuilder(spec, api)
	if spec != nil {
		for method, paths := range builder.analyzer.Operations() {
			for path, operation := range paths {
				fp := fpath.Join(spec.BasePath(), path)
				debugLog("adding route %s %s %q", method, fp, operation.ID)
				builder.AddRoute(method, fp, operation)
			}
		}
	}
	return builder.Build()
}
1007712
func Int64Range(min, max int64) gopter.Gen {
	if max < min {
		return Fail(reflect.TypeOf(int64(0)))
	}
	if max == math.MaxInt64 && min == math.MinInt64 { // Check for range overflow
		return func(genParams *gopter.GenParameters) *gopter.GenResult {
			return gopter.NewGenResult(genParams.NextInt64(), Int64Shrinker)
		}
	}

	rangeSize := uint64(max - min + 1)
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		var nextResult = uint64(min) + (genParams.NextUint64() % rangeSize)
		genResult := gopter.NewGenResult(int64(nextResult), Int64Shrinker)
		genResult.Sieve = func(v interface{}) bool {
			return v.(int64) >= min && v.(int64) <= max
		}
		return genResult
	}
}
1174633
func (m *PlannerDefault) WalkAlter(p *Alter) error {
	u.Debugf("WalkAlter %#v", p)
	return nil
}
155142
func (s *Scheme) Default(src Object) {
	if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok {
		fn(src)
	}
}
455655
func Default(devMode ...bool) *Logger {
	if len(devMode) > 0 && devMode[0] {
		std.SetLogConsume(developmentConsume)
	}
	return std
}
361717
func (st *State) defaultInheritedConfig(cloudName string) func() (attrValues, error) {
	return func() (attrValues, error) {
		var defaults = make(map[string]interface{})
		for k, v := range config.ConfigDefaults() {
			defaults[k] = v
		}
		providerDefaults, err := st.environsProviderConfigSchemaSource(cloudName)
		if errors.IsNotImplemented(err) {
			return defaults, nil
		} else if err != nil {
			return nil, errors.Trace(err)
		}
		fields := schema.FieldMap(providerDefaults.ConfigSchema(), providerDefaults.ConfigDefaults())
		if coercedAttrs, err := fields.Coerce(defaults, nil); err != nil {
			return nil, errors.Trace(err)
		} else {
			for k, v := range coercedAttrs.(map[string]interface{}) {
				defaults[k] = v
			}
		}
		return defaults, nil
	}
}
1011016
func (r *Range) WithDefaults(d Range) Range {
	if r == nil {
		return d
	}

	// Make a copy.
	c := *r

	if c.Max == nil {
		c.Max = d.Max
	}

	if c.Sort == nil {
		c.Sort = d.Sort
	}

	if c.Order == nil {
		c.Order = d.Order
	}

	return c
}
981738
func (Pipe) Default(ctx *context.Context) error {
	var ids = map[string]int{}
	for i, build := range ctx.Config.Builds {
		ctx.Config.Builds[i] = buildWithDefaults(ctx, build)
		ids[ctx.Config.Builds[i].ID]++
	}
	if len(ctx.Config.Builds) == 0 {
		ctx.Config.Builds = []config.Build{
			buildWithDefaults(ctx, ctx.Config.SingleBuild),
		}
	}
	for id, cont := range ids {
		if cont > 1 {
			return fmt.Errorf("found %d builds with the ID '%s', please fix your config", cont, id)
		}
	}
	return nil
}
338571
func (d *Dictionary) RangeIterator(start, end string) segment.DictionaryIterator {
	rv := &DictionaryIterator{
		d: d,
	}

	// need to increment the end position to be inclusive
	var endBytes []byte
	if len(end) > 0 {
		endBytes = []byte(end)
		if endBytes[len(endBytes)-1] < 0xff {
			endBytes[len(endBytes)-1]++
		} else {
			endBytes = append(endBytes, 0xff)
		}
	}

	if d.fst != nil {
		itr, err := d.fst.Iterator([]byte(start), endBytes)
		if err == nil {
			rv.itr = itr
		} else if err != vellum.ErrIteratorDone {
			rv.err = err
		}
	}

	return rv
}
739232
func (bow *Browser) attrOrDefault(name, def string, sel *goquery.Selection) string {
	a, ok := sel.Attr(name)
	if ok {
		return a
	}
	return def
}
223567
func DefaultExpander() Expander {
	p := Platform{platform.CurrentOS(), platform.CurrentArchitecture()}
	return p.Expander()
}
811638
func GetDefaultMutators() map[string][]PodSpecMutatorFunc {
	return map[string][]PodSpecMutatorFunc{
		kubeadmconstants.KubeAPIServer: {
			addNodeSelectorToPodSpec,
			setControlPlaneTolerationOnPodSpec,
			setRightDNSPolicyOnPodSpec,
			setHostIPOnPodSpec,
		},
		kubeadmconstants.KubeControllerManager: {
			addNodeSelectorToPodSpec,
			setControlPlaneTolerationOnPodSpec,
			setRightDNSPolicyOnPodSpec,
		},
		kubeadmconstants.KubeScheduler: {
			addNodeSelectorToPodSpec,
			setControlPlaneTolerationOnPodSpec,
			setRightDNSPolicyOnPodSpec,
		},
	}
}
123250
func (q ReleasesQuery) DefaultRange() headerutil.Range {
	sort, order := "version", "desc"
	return headerutil.Range{
		Sort:  &sort,
		Order: &order,
	}
}
61367
func (sc *StringConstraint) Default(v interface{}) *StringConstraint {
	sc.defaultValue.initialized = true
	sc.defaultValue.value = v
	return sc
}
1049599
func (nc *NumberConstraint) Default(v interface{}) *NumberConstraint {
	nc.defaultValue.initialized = true
	nc.defaultValue.value = v
	return nc
}
682631
func (b *Bucket) DefaultCollection(opts *CollectionOptions) *Collection {
	return b.defaultScope().DefaultCollection(opts)
}