Run of fresh-snapshots for golang-github-glacjay-goini

Try this locally (using the lintian-brush package):

debcheckout golang-github-glacjay-goini
cd golang-github-glacjay-goini
new-upstream --snapshot --no-update-changelog

Merge these changes:

Summary

Merged new upstream version: 0.0~git20161120 (was: 0.0~git20150730).

Diff

Branch: main

diff --git a/debian/changelog b/debian/changelog
index 5eff5d6..b7976dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-golang-github-glacjay-goini (0.0~git20150730-3) UNRELEASED; urgency=medium
+golang-github-glacjay-goini (0.0~git20161120-1) UNRELEASED; urgency=medium
 
+  [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 
- -- Alexandre Viau <aviau@debian.org>  Mon, 02 Apr 2018 16:39:00 -0400
+  [ Debian Janitor ]
+  * New upstream snapshot.
+
+ -- Alexandre Viau <aviau@debian.org>  Thu, 27 May 2021 09:11:33 -0000
 
 golang-github-glacjay-goini (0.0~git20150730-2) unstable; urgency=medium
 
diff --git a/ini.go b/ini.go
index d224f1e..9b5feef 100644
--- a/ini.go
+++ b/ini.go
@@ -51,11 +51,12 @@ func LoadReader(reader *bufio.Reader) (dict Dict, err error) {
 			break
 		}
 		lineno++
-		if len(l) == 0 {
+		
+		line := strings.TrimFunc(string(l), unicode.IsSpace)
+		if len(line) == 0 {
 			continue
 		}
-		line := strings.TrimFunc(string(l), unicode.IsSpace)
-
+		
 		for line[len(line)-1] == '\\' {
 			line = line[:len(line)-1]
 			l, _, err := reader.ReadLine()
diff --git a/ini_test.go b/ini_test.go
index 321faf7..4a64eb3 100644
--- a/ini_test.go
+++ b/ini_test.go
@@ -1,10 +1,11 @@
 package ini
 
 import (
+	"bufio"
 	"io/ioutil"
-	"testing"
+	"os"
 	"strings"
-	"bufio"
+	"testing"
 )
 
 var (
@@ -22,6 +23,17 @@ func TestLoad(t *testing.T) {
 	}
 }
 
+func TestLoadFileWithSpaces(t *testing.T) {
+	if err := ioutil.WriteFile("testLoadFileWithSpaces.ini", []byte(" "), 0777); err != nil {
+		t.Error("Unable to write test file")
+	}
+	defer os.Remove("testLoadFileWithSpaces.ini")
+
+	if _, err := Load("testLoadFileWithSpaces.ini"); err != nil {
+		t.Error("Load: Couldn't load ini file with line consisting only of spaces.")
+	}
+}
+
 func TestWrite(t *testing.T) {
 	d, err := Load("empty.ini")
 	if err != nil {
@@ -162,18 +174,18 @@ func TestString(t *testing.T) {
 	}
 	s, found := d2.GetString("section1", "key1")
 	if !found || s != "value2" {
-	        t.Error("Stringify failed for section1, key1")
+		t.Error("Stringify failed for section1, key1")
 	}
 	i, found := d2.GetInt("section1", "key2")
 	if !found || i != 5 {
-	        t.Error("Stringify failed for section1, key2")
+		t.Error("Stringify failed for section1, key2")
 	}
 	db, found := d2.GetDouble("section1", "key3")
 	if !found || db != 1.3 {
-	        t.Error("Stringify failed for section1, key3")
+		t.Error("Stringify failed for section1, key3")
 	}
 	db, found = d2.GetDouble("section2", "key1")
 	if !found || db != 5.0 {
-	        t.Error("Stringify failed for section2, key1")
+		t.Error("Stringify failed for section2, key1")
 	}
 }

Branch: upstream

Tag: upstream/0.0_git20161120

Diff is too long (more than 200 lines). Download the raw diff.

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

Resulting package

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots golang-github-glacjay-goini-dev

Lintian Result

Full worker log Full build log Full dist log