Fix some tests.
[lightning.git] / diff.go
diff --git a/diff.go b/diff.go
index f1440cef194c7dc7d086290d141fa258b3aca6be..4999643e998e09d0fb9bf387e364c1be494acc6e 100644 (file)
--- a/diff.go
+++ b/diff.go
@@ -1,4 +1,8 @@
-package main
+// Copyright (C) The Lightning Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+package lightning
 
 import (
        "bufio"
@@ -31,8 +35,7 @@ func (cmd *diffFasta) RunCommand(prog string, args []string, stdin io.Reader, st
                return 0
        } else if err != nil {
                return 2
-       }
-       if len(flags.Args()) != 2 {
+       } else if len(flags.Args()) != 2 {
                err = fmt.Errorf("usage: %s [options] a.fasta b.fasta", prog)
                return 2
        }
@@ -49,6 +52,7 @@ func (cmd *diffFasta) RunCommand(prog string, args []string, stdin io.Reader, st
                        }
                        defer f.Close()
                        scanner := bufio.NewScanner(f)
+                       scanner.Buffer(nil, 64*1024*1024)
                        for scanner.Scan() {
                                buf := scanner.Bytes()
                                if len(buf) > 0 && buf[0] != '>' {