mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
Modernize Go code
This commit is contained in:
@@ -96,8 +96,8 @@ func get_dependencies(path string) (ans []dependency) {
|
||||
for _, line := range lines("otool", "-L", path) {
|
||||
line = strings.TrimSpace(line)
|
||||
if strings.Contains(line, "compatibility") && !strings.HasSuffix(line, ":") {
|
||||
idx := strings.IndexByte(line, '(')
|
||||
dep := strings.TrimSpace(line[:idx])
|
||||
before, _, _ := strings.Cut(line, "(")
|
||||
dep := strings.TrimSpace(before)
|
||||
ans = append(ans, dependency{path: dep, is_id: dep == install_name})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user