uncommitted - golang-github-shenwei356-breader

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/.pc/.version b/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/.pc/applied-patches b/.pc/applied-patches
new file mode 100644
index 0000000..e69de29
diff --git a/BufferedReader.go b/BufferedReader.go
index 882018e..88520e6 100644
--- a/BufferedReader.go
+++ b/BufferedReader.go
@@ -46,6 +46,11 @@ type BufferedReader struct {
 func NewDefaultBufferedReader(file string) (*BufferedReader, error) {
 	reader, err := initBufferedReader(file, runtime.NumCPU(), 100, DefaultFunc)
 	if err != nil {
+		if err == xopen.ErrNoContent {
+			reader.Ch = make(chan Chunk, 100)
+			close(reader.Ch)
+			return reader, nil
+		}
 		return reader, err
 	}
 	reader.run()
@@ -56,6 +61,11 @@ func NewDefaultBufferedReader(file string) (*BufferedReader, error) {
 func NewBufferedReader(file string, bufferSize int, chunkSize int, fn func(line string) (interface{}, bool, error)) (*BufferedReader, error) {
 	reader, err := initBufferedReader(file, bufferSize, chunkSize, fn)
 	if err != nil {
+		if err == xopen.ErrNoContent {
+			reader.Ch = make(chan Chunk, bufferSize)
+			close(reader.Ch)
+			return reader, nil
+		}
 		return reader, err
 	}
 	reader.run()
@@ -79,7 +89,7 @@ func initBufferedReader(file string, bufferSize int, chunkSize int, fn func(line
 	reader := new(BufferedReader)
 	fh, err := xopen.Ropen(file)
 	if err != nil {
-		return nil, err
+		return reader, err
 	}
 	reader.reader = fh
 
diff --git a/debian/changelog b/debian/changelog
index e8a32ad..02b5b7e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+golang-github-shenwei356-breader (0.3.1-1) unstable; urgency=medium
+
+  * New upstream version
+  * Standards-Version: 4.6.0 (routine-update)
+
+ -- Nilesh Patra <nilesh@debian.org>  Sun, 26 Sep 2021 18:34:01 +0530
+
 golang-github-shenwei356-breader (0.1.0-1) unstable; urgency=medium
 
   * d/watch: Upstream started tagging releases,
diff --git a/debian/control b/debian/control
index 48d6f8e..192111d 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends: debhelper-compat (= 13),
                golang-any,
                golang-github-shenwei356-xopen-dev,
                golang-github-twotwotwo-sorts-dev
-Standards-Version: 4.5.1
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-shenwei356-breader
 Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-shenwei356-breader.git
 Homepage: https://github.com/shenwei356/breader
diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml
index 594e14e..03e820d 100644
--- a/debian/gitlab-ci.yml
+++ b/debian/gitlab-ci.yml
@@ -1,6 +1,26 @@
 # auto-generated, DO NOT MODIFY.
 # The authoritative copy of this file lives at:
-# https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go
----
-include:
-  - https://salsa.debian.org/go-team/infra/pkg-go-tools/-/raw/master/pipeline/test-archive.yml
+# https://salsa.debian.org/go-team/ci/blob/master/config/gitlabciyml.go
+
+image: stapelberg/ci2
+
+test_the_archive:
+  artifacts:
+    paths:
+    - before-applying-commit.json
+    - after-applying-commit.json
+  script:
+    # Create an overlay to discard writes to /srv/gopath/src after the build:
+    - "rm -rf /cache/overlay/{upper,work}"
+    - "mkdir -p /cache/overlay/{upper,work}"
+    - "mount -t overlay overlay -o lowerdir=/srv/gopath/src,upperdir=/cache/overlay/upper,workdir=/cache/overlay/work /srv/gopath/src"
+    - "export GOPATH=/srv/gopath"
+    - "export GOCACHE=/cache/go"
+    # Build the world as-is:
+    - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > before-applying-commit.json"
+    # Copy this package into the overlay:
+    - "GBP_CONF_FILES=:debian/gbp.conf gbp buildpackage --git-no-pristine-tar --git-ignore-branch --git-ignore-new --git-export-dir=/tmp/export --git-no-overlay --git-tarball-dir=/nonexistant --git-cleaner=/bin/true --git-builder='dpkg-buildpackage -S -d --no-sign'"
+    - "pgt-gopath -dsc /tmp/export/*.dsc"
+    # Rebuild the world:
+    - "ci-build -exemptions=/var/lib/ci-build/exemptions.json > after-applying-commit.json"
+    - "ci-diff before-applying-commit.json after-applying-commit.json"
diff --git a/go.mod b/go.mod
index 850a188..f0cdb1c 100644
--- a/go.mod
+++ b/go.mod
@@ -3,9 +3,9 @@ module github.com/shenwei356/breader
 go 1.16
 
 require (
-	github.com/klauspost/compress v1.11.4 // indirect
+	github.com/klauspost/compress v1.13.6 // indirect
 	github.com/klauspost/pgzip v1.2.5 // indirect
-	github.com/shenwei356/xopen v0.0.0-20181203091311-f4f16ddd3992
+	github.com/shenwei356/xopen v0.1.0
 	github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553
 	gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
 )
diff --git a/go.sum b/go.sum
index 01a4b7b..6f32e1e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-github.com/klauspost/compress v1.11.4 h1:kz40R/YWls3iqT9zX9AHN3WoVsrAWVyui5sxuLqiXqU=
-github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
+github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc=
+github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
 github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
 github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
 github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
@@ -7,8 +7,8 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/shenwei356/xopen v0.0.0-20181203091311-f4f16ddd3992 h1:RXEEyKj0JL3SrRIYsWIEyy4AwjHbI3I8aDGK6CA4+YI=
-github.com/shenwei356/xopen v0.0.0-20181203091311-f4f16ddd3992/go.mod h1:6EQUa6I7Zsl2GQKqcL9qGLrTzVE+oZyly+uhzovQYSk=
+github.com/shenwei356/xopen v0.1.0 h1:PizY52rLA7A6EdkwKZ6A8h8/a+c9DCBXqfLtwVzsWnM=
+github.com/shenwei356/xopen v0.1.0/go.mod h1:6EQUa6I7Zsl2GQKqcL9qGLrTzVE+oZyly+uhzovQYSk=
 github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553 h1:DRC1ubdb3ZmyyIeCSTxjZIQAnpLPfKVgYrLETQuOPjo=
 github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553/go.mod h1:Rj7Csq/tZ/egz+Ltc2IVpsA5309AmSMEswjkTZmq2Xc=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

Run locally

More details

Full run details