refactor: remove HandleFile method

pull/7/head
sundowndev 2022-11-17 17:35:21 +04:00
parent 5f20de76b9
commit a3eab6ef82
4 changed files with 0 additions and 28 deletions

View File

@ -3,7 +3,6 @@ package check
import (
"fmt"
"github.com/sirupsen/logrus"
"github.com/sundowndev/covermyass/v2/lib/find"
"os"
)
@ -31,10 +30,6 @@ func (s *shellHistoryCheck) Paths() []string {
}
}
func (s *shellHistoryCheck) HandleFile(file find.FileInfo) error {
return os.Truncate(file.Path(), 0)
}
func init() {
AddCheck(NewShellHistoryCheck())
}

View File

@ -1,9 +1,5 @@
package check
import (
"github.com/sundowndev/covermyass/v2/lib/find"
)
const (
Linux = "linux"
Darwin = "darwin"
@ -15,7 +11,6 @@ var checks []Check
type Check interface {
Name() string
Paths() []string
HandleFile(find.FileInfo) error
}
func GetAllChecks() []Check {

View File

@ -2,11 +2,6 @@
package check
import (
"github.com/sundowndev/covermyass/v2/lib/find"
"os"
)
type lastLogCheck struct{}
func NewLastLogCheck() Check {
@ -23,10 +18,6 @@ func (s *lastLogCheck) Paths() []string {
}
}
func (s *lastLogCheck) HandleFile(file find.FileInfo) error {
return os.Truncate(file.Path(), 0)
}
func init() {
AddCheck(NewLastLogCheck())
}

View File

@ -2,11 +2,6 @@
package check
import (
"github.com/sundowndev/covermyass/v2/lib/find"
"os"
)
type sshdCheck struct{}
func NewSSHdCheck() Check {
@ -23,10 +18,6 @@ func (s *sshdCheck) Paths() []string {
}
}
func (s *sshdCheck) HandleFile(file find.FileInfo) error {
return os.Truncate(file.Path(), 0)
}
func init() {
AddCheck(NewSSHdCheck())
}