Skip to content

seipan/logdel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logdel

This oss is a tool to delete log.Println(), etc. written for debugging, etc.

Bug

When using this tool, all comment-outs go to the bottom of the file. Please use with this in mind.

Example

Before

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

package a

import (
	"log"
)

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

Install

go install "github.com/seipan/logdel/cmd/logdel"

Use

go vet -vettool=`which logdel` pkgname

About

🥷A static analysis tool to remove standard outputs like log.Println()🥷

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages