Skip to content

Commit

Permalink
Merge pull request #22 from budougumi0617/test/add-test-for-issue-20
Browse files Browse the repository at this point in the history
test: add tests
  • Loading branch information
budougumi0617 authored Sep 16, 2024
2 parents 0486cda + 69ff912 commit f0dc261
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testdata/input/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ func SampleFunc(ctx context.Context) {
func SampleHandler(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Hello, %q", req.URL.Path)
}

// ref: https://github.com/budougumi0617/nrseg/issues/20
func ArgWithouteNameHandler(http.ResponseWriter, *http.Request) {
fmt.Println("issue #20")
}

// ref: https://github.com/budougumi0617/nrseg/issues/20
func ArgWithouteName(context.Context, string) {
fmt.Println("issue #20")
}
10 changes: 10 additions & 0 deletions testdata/want/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ func SampleHandler(w http.ResponseWriter, req *http.Request) {
defer newrelic.FromContext(req.Context()).StartSegment("sample_handler").End()
fmt.Fprintf(w, "Hello, %q", req.URL.Path)
}

// ref: https://github.com/budougumi0617/nrseg/issues/20
func ArgWithouteNameHandler(http.ResponseWriter, *http.Request) {
fmt.Println("issue #20")
}

// ref: https://github.com/budougumi0617/nrseg/issues/20
func ArgWithouteName(context.Context, string) {
fmt.Println("issue #20")
}

0 comments on commit f0dc261

Please sign in to comment.