renamed RegisterFormatter to Format
Этот коммит содержится в:
родитель
970eddc16a
коммит
882480ccd0
4 изменённых файлов: 6 добавлений и 5 удалений
|
@ -150,6 +150,7 @@ obvious reason to keep an interface.
|
|||
- in order to support running suite concurrently, needed to refactor an entry point of application. The **Run** method
|
||||
now is a func of godog package which initializes and run the suite (or more suites). Method **New** is removed. This
|
||||
change made godog a little cleaner.
|
||||
- renamed **RegisterFormatter** func to **Format** to be more consistent.
|
||||
|
||||
### FAQ
|
||||
|
||||
|
|
6
fmt.go
6
fmt.go
|
@ -65,10 +65,10 @@ func findFmt(format string) (f Formatter, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// RegisterFormatter registers a feature suite output
|
||||
// Format registers a feature suite output
|
||||
// Formatter as the name and descriptiongiven.
|
||||
// Formatter is used to represent suite output
|
||||
func RegisterFormatter(name, description string, f Formatter) {
|
||||
func Format(name, description string, f Formatter) {
|
||||
formatters = append(formatters, ®isteredFormatter{
|
||||
name: name,
|
||||
fmt: f,
|
||||
|
@ -82,7 +82,7 @@ func RegisterFormatter(name, description string, f Formatter) {
|
|||
// New formatters may be created to represent
|
||||
// suite results in different ways. These new
|
||||
// formatters needs to be registered with a
|
||||
// RegisterFormatter function call
|
||||
// godog.Format function call
|
||||
type Formatter interface {
|
||||
Feature(*gherkin.Feature, string)
|
||||
Node(interface{})
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
RegisterFormatter("pretty", "Prints every feature with runtime statuses.", &pretty{
|
||||
Format("pretty", "Prints every feature with runtime statuses.", &pretty{
|
||||
basefmt: basefmt{
|
||||
started: time.Now(),
|
||||
indent: 2,
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
func init() {
|
||||
RegisterFormatter("progress", "Prints a character per step.", &progress{
|
||||
Format("progress", "Prints a character per step.", &progress{
|
||||
basefmt: basefmt{
|
||||
started: time.Now(),
|
||||
indent: 2,
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче