Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
seipan committed Mar 17, 2023
1 parent d91e9c5 commit 57840c6
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
# logdel
This oss is a tool to delete log.Println(), etc. written for debugging, etc.

## Example

Before
```go
package a

import (
"log"
)

func f() {
log.Println("nocheck") // nocheck:thislog
log.Println("delete")
log.Print("delete")
if 1 == 10 {
log.Println(11)
}

for i := 0; i < 2; i++ {
log.Println(1)
}
}
```

After
```go

package a

import (
"log"
)

func f() {
log.Println("nocheck")
if 1 == 10 {
}
for i := 0; i < 2; i++ {
}
}


```


## Install
```go
import "github.com/seipan/logdel/cmd/logdel"
```

## Use
```go
go vet -vettool=`which logdel` pkgname
```



0 comments on commit 57840c6

Please sign in to comment.