// Hint adds hints to the flow.
977173
func (d *Flow) Hint(options ...FlowHintOption) {
	var config FlowConfig
	for _, option := range options {
		option(&config)
	}
}
751135
func suggest(s string) (a []string) {
	var g Suggestions
	for _, c := range commands {
		if d := editDistance(s, c.Name()); d < 4 {
			if c.Runnable() {
				g = append(g, Suggestion{c.Name(), d})
			} else {
				g = append(g, Suggestion{strconv.Quote("help " + c.Name()), d})
			}
		}
	}
	sort.Sort(g)
	for i, s := range g {
		a = append(a, s.s)
		if i >= 4 {
			break
		}
	}
	return a
}
826506
func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool {
	emitter.indents = append(emitter.indents, emitter.indent)
	if emitter.indent < 0 {
		if flow {
			emitter.indent = emitter.best_indent
		} else {
			emitter.indent = 0
		}
	} else if !indentless {
		emitter.indent += emitter.best_indent
	}
	return true
}
630745
func (nd *Node) putConnectionWithHint(conn *Connection, hint byte) bool {
	conn.refresh()
	if !nd.active.Get() || !nd.connections.Offer(conn, hint) {
		conn.Close()
		return false
	}
	return true
}
78678
func (c *Confirm) Prompt() (interface{}, error) {
	// render the question template
	err := c.Render(
		ConfirmQuestionTemplate,
		ConfirmTemplateData{Confirm: *c},
	)
	if err != nil {
		return "", err
	}

	// get input and return
	return c.getBool(false)
}
265717
func (rt *RandomTree) Predict(from base.FixedDataGrid) (base.FixedDataGrid, error) {
	return rt.Root.Predict(from)
}
724863
func RunWithPromptAndPrelude(vm *otto.Otto, prompt, prelude string) error {
	return RunWithOptions(vm, Options{
		Prompt:  prompt,
		Prelude: prelude,
	})
}
712543
func (g *Graph) flow() {
	n := 0
	var nod *Graph

	for i := 0; i < g.Len(); i++ {

		node := g.Out[i]
		s := node.ThisString()

		if s == TypeIf || s == TypeFor {
			n++
			if n == 1 {
				nod = node.Add(TypeTemplate)
				continue
			}
		}

		if s == TypeElse {
			if n == 1 {
				nod.flow()
				nod = node
				continue
			}
		}

		if s == TypeEnd {
			n--
			if n == 0 {
				nod.flow()
				g.DeleteAt(i)
				i--
				continue
			}
		}

		if n > 0 {
			nod.Add(node)
			g.DeleteAt(i)
			i--
		}
	}

}
538409
func (tx *Transaction) AddFlow(flow string, args ...interface{}) {
	if len(args) > 0 {
		flow = fmt.Sprintf(flow, args...)
	}
	tx.ofctlExec("add-flow", tx.bridge, flow)
}
623618
func (fc *Flow) Source(name string, f func(io.Writer, *pb.InstructionStat) error) (ret *Dataset) {
	ret = fc.NewNextDataset(1)
	step := fc.AddOneToOneStep(nil, ret)
	step.IsOnDriverSide = true
	step.Name = name
	step.Function = func(readers []io.Reader, writers []io.Writer, stats *pb.InstructionStat) error {
		errChan := make(chan error, len(writers))
		for _, writer := range writers {
			go func(writer io.Writer) {
				errChan <- f(writer, stats)
			}(writer)
		}
		for range writers {
			err := <-errChan
			if err != nil {
				return err
			}
		}
		return nil
	}
	return
}
176174
func (f *Flow) add(action action) {
	f.actions = append(f.actions, action)
}
524094
func Dot(s *flow.Step) string {
	trs := flowDot(s, map[*flow.Step]bool{})
	return fmt.Sprintf("digraph G {\n\trankdir=LR\n%s\n}\n", strings.Join(trs, "\n"))
}
1181482
func (s *stream) Warn(format string, args ...interface{}) {
	s.log.output(s.quiet, &line{"", s.log.format(s.timestamps, warn, format, args), s})
}
1225336
func (s *DeleteByQueryService) SuggestText(suggestText string) *DeleteByQueryService {
	s.suggestText = suggestText
	return s
}
533497
func (a Actor) Confirm(message string, def ConfirmDefault) (confirmed bool, err error) {
	for {
		confirmed, err := a.confirmOnce(message, def)
		if err == errNoOptionSelected {
			fmt.Fprintln(a.w, err)
			continue
		}
		return confirmed, err
	}
}
696262
func (f *flowBuf) put(cond bool, term bool, jumps []*uint) {
	pc := f.cb.nextPC()
	if ent, ok := f.ents[pc]; ok {
		log.Panicf("Flow entry already exists at PC %d: %+v", pc, ent)
	}
	f.ents[pc] = &flowEnt{cond, term, jumps, false}
}
592367
func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool {
	// Reset the simple key on the next level.
	parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{})

	// Increase the flow level.
	parser.flow_level++
	return true
}