Skip to content

Commit b6d5ebb

Browse files
committed
chore: fix lint
1 parent 4bf6b88 commit b6d5ebb

2 files changed

Lines changed: 0 additions & 34 deletions

File tree

deps/deps.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -370,29 +370,6 @@ var dependencies = map[string]Dependency{
370370
},
371371
}
372372

373-
// verifyChecksum verifies the SHA256 checksum of a file
374-
func verifyChecksum(filepath, expectedChecksum string) error {
375-
file, err := os.Open(filepath)
376-
if err != nil {
377-
return err
378-
}
379-
defer file.Close()
380-
381-
hash := sha256.New()
382-
if _, err := io.Copy(hash, file); err != nil {
383-
return err
384-
}
385-
386-
actualChecksum := fmt.Sprintf("%x", hash.Sum(nil))
387-
expectedChecksum = strings.TrimSpace(expectedChecksum)
388-
389-
if actualChecksum != expectedChecksum {
390-
return fmt.Errorf("checksum mismatch: expected %s, got %s", expectedChecksum, actualChecksum)
391-
}
392-
393-
return nil
394-
}
395-
396373
// Install installs a dependency with configurable options
397374
func Install(name, version string, opts ...InstallOption) error {
398375
name = strings.ToLower(name)

files/files.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,6 @@ func (a *Archive) String() string {
124124
var blacklistedPathSymbols = "{}[]?*:<>|"
125125
var blockedPrefixes = []string{"/run/", "/proc/", "/etc/", "/var/", "/tmp/", "/dev/"}
126126

127-
func isASCII(s string) bool {
128-
for i := 0; i < len(s); i++ {
129-
130-
if s[i] > unicode.MaxASCII || unicode.IsControl(rune(s[i])) {
131-
return false
132-
}
133-
}
134-
return true
135-
136-
}
137-
138127
// ValidatePath validates a single path for security issues
139128
func ValidatePath(path string) error {
140129
// Check for control characters that could be dangerous

0 commit comments

Comments
 (0)