Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Client does not attempt to limit concurrency of multiple `godog` scenarios, it i
the service is capable to process multiple scenarios simultaneously, or scenarios are
[synchronized explicitly](https://github.com/godogx/resource#steps).

If you have a `curl` command with relevant request, you can convert it to steps with [`curl2steps`](./cmd/curl2steps).

#### Request Setup

```gherkin
Expand Down
6 changes: 6 additions & 0 deletions cmd/curl2steps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This tool converts `curl` command to steps.

## Install

```
go install github.com/godogx/httpsteps/cmd/curl2steps@latest
```

## Examples

```
Expand Down
5 changes: 4 additions & 1 deletion cmd/curl2steps/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@
v := t[k]

for _, vv := range v {
fmt.Printf(" | %s | %s |\n", k, vv)
fmt.Printf(" | %s | %s |\n",
strings.ReplaceAll(k, "|", `\|`),
strings.ReplaceAll(vv, "|", `\|`),
)

Check notice on line 101 in cmd/curl2steps/main.go

View workflow job for this annotation

GitHub Actions / test (stable)

1 statement(s) on lines 97:102 are not covered by tests.
}
}
}
Expand Down
Loading