Skip to content

Commit

Permalink
Fix reviewdog
Browse files Browse the repository at this point in the history
  • Loading branch information
nao1215 committed Oct 15, 2023
1 parent e580777 commit 9590606
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ func (d *debug) enable() {
d.enabled = true
}

// disable will disable debug logging
func (d *debug) disable() {
d.enabled = false
}

// isEnable returns true if debug logging is enabled
func (d *debug) isEnable() bool {
return d.enabled
Expand Down
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (u *unmatchedMockError) Error() string {

// orderedMockKeys returns the keys of the errors map in order.
func (u *unmatchedMockError) orderedMockKeys() []int {
var mockKeys []int
mockKeys := make([]int, 0, len(u.errors))
for mockKey := range u.errors {
mockKeys = append(mockKeys, mockKey)
}
Expand Down
4 changes: 2 additions & 2 deletions spectest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ func TestHTTPMethodOptions(t *testing.T) {
func TestHTTPMethodTrace(t *testing.T) {
t.Run("success case: test Trace()", func(t *testing.T) {
handler := http.NewServeMux()
handler.HandleFunc("/trace", func(w http.ResponseWriter, r *http.Request) {
handler.HandleFunc("/trace123", func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodTrace {
t.Fatalf("expected method to be TRACE, got %s", r.Method)
}
Expand All @@ -1546,7 +1546,7 @@ func TestHTTPMethodTrace(t *testing.T) {

spectest.New().
Handler(handler).
Trace("/trace").
Tracef("/trace%s", "123").
Header("User-Agent", "Go-http-client/1.1").
Header("Keep-Alive", "timeout=5, max=1000").
Expect(t).
Expand Down

0 comments on commit 9590606

Please sign in to comment.