Skip to content

Latest commit

 

History

History
130 lines (94 loc) · 3.88 KB

File metadata and controls

130 lines (94 loc) · 3.88 KB
comment and every _placeholder_ value
3. Delete this header block before committing

Add the new file to the table in docs/README.md (flows section). Also add the flow to the table in docs/authoring-flows.md (Built-in flows). Register it in flows/registry.go Default(). ───────────────────────────────────────────────────────────────────────── -->

Flow: _flow-id_


Identity

Field Value
ID _flow-id_
Title Flow Title
File flows/_flow_id_.go
Root question _root_question_id_

Questions

ID Type Label Options / Default
_id_ Text "label" Default: "_default_"
_id_ Option "label" _opt1_, _opt2_
_id_ Confirm "label" Default: true

Question graph

_root_question_id_
  └── _next_question_id_
        ├── [option A] → _branch_a_
        │                 └── _shared_question_
        └── [option B] → _shared_question_
                           └── confirm_generate
                                 └── (end)

Generator resolution

Condition Generators added
Always base_project
_answer_key_ = _value_ _generator_name_
(plugin) _plugin_key_ = true _plugin_id_._gen_

Fixture examples

Happy path (tools/test-flow/testdata/_fixture_name_.json):

{
  "name": "_fixture_name_",
  "flow_id": "_flow-id_",
  "answers": {
    "_root_question_id_": "_value_",
    "confirm_generate": true
  },
  "expected_visited": [
    "_root_question_id_",
    "confirm_generate"
  ],
  "skip_post_commands": false,
  "skip_test_commands": false
}

Source

flows/_flow_id_.go

See also