Skip to content

Commit

Permalink
dont use string nil
Browse files Browse the repository at this point in the history
  • Loading branch information
linyows committed Oct 16, 2023
1 parent fbc2cb6 commit 3e463e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ var (
)

func (e Elapse) String() string {
if e < 0 {
return "nil"
}
return fmt.Sprintf("%d msec", e)
}

Expand Down
4 changes: 0 additions & 4 deletions pipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ func TestElapseString(t *testing.T) {
elapse: 2147483647,
expect: "2147483647 msec",
},
{
elapse: -1,
expect: "nil",
},
}

for _, v := range tests {
Expand Down

0 comments on commit 3e463e2

Please sign in to comment.