func (s *Scenario) LongestLine() int {
	if s.longestLine == 0 {
		s.longestLine = len("Scenario: " + s.Title)
		for _, step := range s.Steps {
			if l := len(string(step.Type) + " " + step.Text); l > s.longestLine {
				s.longestLine = l
			}
		}
	}
	return s.longestLine
}
LongestLine returns the longest step line in a scenario.
package gherkin
import (
	"reflect"
	"strings"
)
type Attack struct {
	Filename string
	Line int
	Title string
	Description string
	Tags []string
	Background Scenario
	Scenarios []Scenario
	longestLine int
}
type Scenario struct {
	Filename string
	Line int
	Title string
	Tags []string
	Steps []Step
	Examples StringData
	longestLine int
}
type Step struct {
	Filename string
	Line int
	Type StepType
	Text string
	Argument StringData
}
type StringData string
type TabularData [][]string
type TabularDataMap map[string][]string
type StepType string
func (s StringData) ToTable() TabularData {
	var tabData TabularData
	lines := strings.Split(string(s), "\n")
	for _, line := range lines {
		row := strings.Split(line, "|")
		row = row[1 : len(row)-1]
		for i, c := range row {
			row[i] = strings.TrimSpace(c)
		}
		tabData = append(tabData, row)
	}
	return tabData
}
func (s StringData) IsTabular() bool {
	return len(s) > 0 && s[0] == '|'
}
func (t TabularData) ToMap() TabularDataMap {
	m := TabularDataMap{}
	if len(t) > 1 {
		for _, th := range t[0] {
			m[th] = []string{}
		}
		for _, tr := range t[1:] {
			for c, td := range tr {
				m[t[0][c]] = append(m[t[0][c]], td)
			}
		}
	}
	return m
}
func (t TabularDataMap) NumRows() int {
	if len(t) == 0 {
		return 0
	}
	return len(t[reflect.ValueOf(t).MapKeys()[0].String()])
}