Более удобный вывод генерённых функций и шагов

Этот коммит содержится в:
Softonik 2023-05-03 00:01:22 +03:00 коммит произвёл Nikolay Kopitonenko
родитель 3c9fe54fd6
коммит baac88ef73

Просмотреть файл

@ -24,12 +24,13 @@ var snippetHelperFuncs = template.FuncMap{
} }
var undefinedSnippetsTpl = template.Must(template.New("snippets").Funcs(snippetHelperFuncs).Parse(` var undefinedSnippetsTpl = template.Must(template.New("snippets").Funcs(snippetHelperFuncs).Parse(`
{{ range . }}func {{ .Method }}({{ .Args }}) { func InitializeScenario(ctx *godog.ScenarioContext) {}
} // ---
{{end}}func InitializeScenario(ctx *godog.ScenarioContext) { {{ range . }}
ctx.Step({{ backticked .Expr }}, {{ .Method }}){{end}} {{ range . }}func {{ .Method }}({{ .Args }}) { }
} {{end}}
{{ range . }} ctx.Step({{ backticked .Expr }}, {{ .Method }}){{end}}
`)) `))
type undefinedSnippet struct { type undefinedSnippet struct {