Skip to content

Commit c047d6e

Browse files
committed
style: fix linter issues
1 parent 1b3b0c1 commit c047d6e

4 files changed

+9
-9
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
"github.com/grafana/k6deps"
4343
)
4444

45-
const script_with_pragma = `
45+
const scriptWithPragma = `
4646
"use k6 > 0.54";
4747
"use k6 with k6/x/faker > 0.4.0";
4848
"use k6 with k6/x/sql >= 1.0.1";
@@ -59,7 +59,7 @@ func ExampleAnalyze_with_pragma() {
5959
deps, _ := k6deps.Analyze(&k6deps.Options{
6060
Script: k6deps.Source{
6161
Name: "script.js",
62-
Contents: []byte(script_with_pragma),
62+
Contents: []byte(scriptWithPragma),
6363
},
6464
// disable automatic source detection
6565
Manifest: k6deps.Source{Ignore: true},
@@ -89,7 +89,7 @@ import (
8989
"github.com/grafana/k6deps"
9090
)
9191

92-
const script_without_pragma = `
92+
const scriptWithoutPragma = `
9393
import { Faker } from "k6/x/faker";
9494
import sql from "k6/x/sql";
9595
import driver from "k6/x/sql/driver/ramsql";
@@ -102,7 +102,7 @@ func ExampleAnalyze_without_pragma() {
102102
deps, _ := k6deps.Analyze(&k6deps.Options{
103103
Script: k6deps.Source{
104104
Name: "script.js",
105-
Contents: []byte(script_without_pragma),
105+
Contents: []byte(scriptWithoutPragma),
106106
},
107107
// disable automatic source detection
108108
Manifest: k6deps.Source{Ignore: true},

analyze_example_with_pragma_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/grafana/k6deps"
77
)
88

9-
const script_with_pragma = `
9+
const scriptWithPragma = `
1010
"use k6 > 0.54";
1111
"use k6 with k6/x/faker > 0.4.0";
1212
"use k6 with k6/x/sql >= 1.0.1";
@@ -23,7 +23,7 @@ func ExampleAnalyze_with_pragma() {
2323
deps, _ := k6deps.Analyze(&k6deps.Options{
2424
Script: k6deps.Source{
2525
Name: "script.js",
26-
Contents: []byte(script_with_pragma),
26+
Contents: []byte(scriptWithPragma),
2727
},
2828
// disable automatic source detection
2929
Manifest: k6deps.Source{Ignore: true},

analyze_example_without_pragma_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/grafana/k6deps"
77
)
88

9-
const script_without_pragma = `
9+
const scriptWithoutPragma = `
1010
import { Faker } from "k6/x/faker";
1111
import sql from "k6/x/sql";
1212
import driver from "k6/x/sql/driver/ramsql";
@@ -19,7 +19,7 @@ func ExampleAnalyze_without_pragma() {
1919
deps, _ := k6deps.Analyze(&k6deps.Options{
2020
Script: k6deps.Source{
2121
Name: "script.js",
22-
Contents: []byte(script_without_pragma),
22+
Contents: []byte(scriptWithoutPragma),
2323
},
2424
// disable automatic source detection
2525
Manifest: k6deps.Source{Ignore: true},

cmd/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import "github.com/grafana/k6deps/cmd"
55
func ExampleNew() {
66
c := cmd.New()
77
c.SetArgs([]string{"testdata/combined.js"})
8-
c.Execute()
8+
_ = c.Execute()
99
// Output:
1010
// {"k6":">0.54","k6/x/faker":">0.4.0","k6/x/sql":">=1.0.1","k6/x/sql/driver/ramsql":"*"}
1111
}

0 commit comments

Comments
 (0)