Skip to content

Commit

Permalink
feat: fix MQTT abbrevation in xk6-mqtt description
Browse files Browse the repository at this point in the history
  • Loading branch information
szkiba committed Jul 30, 2024
1 parent 102090d commit 70ed530
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmd/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ func legacyPatch(ext *k6registry.Extension) {
if len(override.module) != 0 {
ext.Module = override.module
}

for from, to := range phrases {
ext.Description = strings.ReplaceAll(ext.Description, from, to)
}
}

type extOverride struct {
Expand Down Expand Up @@ -202,3 +206,7 @@ var extOverrides = map[string]extOverride{ //nolint:gochecknoglobals
"go.k6.io/k6": {},
"github.com/wosp-io/xk6-playwright": {module: "github.com/nicholasvuono/xk6-playwright"},
}

var phrases = map[string]string{ //nolint:gochecknoglobals
"mqtt": "MQTT",
}
2 changes: 1 addition & 1 deletion docs/legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
imports:
- k6/x/sse
- module: github.com/pmalhaire/xk6-mqtt
description: mqtt extension
description: MQTT extension
imports:
- k6/x/mqtt
- module: github.com/skibum55/xk6-git
Expand Down

0 comments on commit 70ed530

Please sign in to comment.