mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
refactor: remove dead code and rename V2 files (#541)
* refactor: remove V1 dead code and rename V2 files
- Delete extractor/ package (V1 Extractor interface and registry)
- Delete browserdata/ package (V1 orchestrator, outputter, 9 sub-packages)
- Delete V1 browser implementations (chromium.go, chromium_{platform}.go, firefox.go)
- Delete types/types.go (V1 DataType enum) and utils/byteutil/
- Remove gocsv and go-sqlmock dependencies, demote x/text to indirect
- Upgrade keychainbreaker v0.1.0 → v0.2.5
- Rename chromium_new.go → chromium.go, firefox_new.go → firefox.go
* refactor: remove unused V1 utility functions
Remove functions no longer called by V2 code:
- fileutil: IsDirExists, CopyDir, BrowserName, ReadFile, CopyFile,
Filename, ParentDir, ParentBaseDir, BaseDir
- typeutil: Keys, IntToBool
This commit is contained in:
@@ -4,30 +4,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Keys returns a slice of the keys of the map. based with go 1.18 generics
|
||||
func Keys[K comparable, V any](m map[K]V) []K {
|
||||
r := make([]K, 0, len(m))
|
||||
for k := range m {
|
||||
r = append(r, k)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
// Signed is a constraint that permits any signed integer type.
|
||||
// If future releases of Go add new predeclared signed integer types,
|
||||
// this constraint will be modified to include them.
|
||||
type Signed interface {
|
||||
~int | ~int8 | ~int16 | ~int32 | ~int64
|
||||
}
|
||||
|
||||
func IntToBool[T Signed](a T) bool {
|
||||
switch a {
|
||||
case 0, -1:
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func Reverse[T any](s []T) []T {
|
||||
h := make([]T, len(s))
|
||||
for i := 0; i < len(s); i++ {
|
||||
|
||||
Reference in New Issue
Block a user