Skip to content

Commit 8c8b5d2

Browse files
committed
apt
1 parent 6243bb6 commit 8c8b5d2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

apt.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ func Search(pattern string) ([]*Package, error) {
6565
func parseDpkgQueryOutput(out []byte) []*Package {
6666
res := []*Package{}
6767
scanner := bufio.NewScanner(bytes.NewReader(out))
68-
buf := make([]byte, 0, 1024*1024) // 1 MB buffer
69-
scanner.Buffer(buf, 1024*1024) // Set max buffer size to 1 MB
7068
for scanner.Scan() {
7169
data := strings.Split(scanner.Text(), "\t")
7270
size, err := strconv.Atoi(data[4])
@@ -113,8 +111,6 @@ func parseListUpgradableOutput(r io.Reader) []*Package {
113111

114112
res := []*Package{}
115113
scanner := bufio.NewScanner(r)
116-
buf := make([]byte, 0, 1024*1024) // 1 MB buffer
117-
scanner.Buffer(buf, 1024*1024) // Set max buffer size to 1 MB
118114
for scanner.Scan() {
119115
matches := re.FindAllStringSubmatch(scanner.Text(), -1)
120116
if len(matches) == 0 {

0 commit comments

Comments
 (0)