New Upstream Release - golang-gopkg-hlandau-easyconfig.v1

Ready changes

Summary

Merged new upstream version: 1.0.18 (was: 1.0.17).

Resulting package

Built on 2022-10-20T11:28 (took 10m20s)

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

apt install -t fresh-releases golang-gopkg-hlandau-easyconfig.v1-dev

Lintian Result

Diff

diff --git a/README.md b/README.md
index c6704b1..1276e3b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 easyconfig: Easy bindings for configurable
 ==========================================
 
-[![GoDoc](https://godoc.org/gopkg.in/hlandau/easyconfig.v1?status.svg)](https://godoc.org/gopkg.in/hlandau/easyconfig.v1)
+[![godocs.io](https://godocs.io/gopkg.in/hlandau/easyconfig.v1?status.svg)](https://godocs.io/gopkg.in/hlandau/easyconfig.v1) [![No modules](https://www.devever.net/~hl/f/no-modules2.svg) 100% modules-free.](https://www.devever.net/~hl/gomod)
 
 easyconfig provides utilities for use with
 [configurable](https://github.com/hlandau/configurable). It makes it easy to
diff --git a/cstruct/cstruct.go b/cstruct/cstruct.go
index aa81205..f3cb026 100644
--- a/cstruct/cstruct.go
+++ b/cstruct/cstruct.go
@@ -17,6 +17,7 @@
 // appropriately as you see fit, for example by calling configurable.Register.
 package cstruct
 
+import "time"
 import "fmt"
 import "reflect"
 import "strings"
@@ -136,7 +137,7 @@ func New(target interface{}, name string) (c configurable.Configurable, err erro
 			var dfltv reflect.Value
 			dfltv, err = parseString(dflt, vf.Type())
 			if err != nil {
-				err = fmt.Errorf("invalid default value: %#v", dflt)
+				err = fmt.Errorf("invalid default value: %#v: %v", dflt, err)
 				return
 			}
 
@@ -250,7 +251,19 @@ func parseString(s string, t reflect.Type) (reflect.Value, error) {
 	case reflect.String:
 		return reflect.ValueOf(s), nil
 
+	case reflect.Int64:
+		if t.String() == "time.Duration" {
+			d, err := time.ParseDuration(s)
+			if err != nil {
+				return reflect.Value{}, err
+			}
+			return reflect.ValueOf(d), nil
+		}
+		break
+
 	default:
-		return reflect.Value{}, fmt.Errorf("cannot coerce string %#v to type %v", s, t)
+		break
 	}
+
+	return reflect.Value{}, fmt.Errorf("cannot coerce string %#v to type %v (%v)", s, t, t.Kind())
 }
diff --git a/debian/changelog b/debian/changelog
index 9e9d2bb..52e9594 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-gopkg-hlandau-easyconfig.v1 (1.0.18-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 20 Oct 2022 11:18:50 -0000
+
 golang-gopkg-hlandau-easyconfig.v1 (1.0.17-5) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/license.patch b/debian/patches/license.patch
index 33d2db9..b9ca449 100644
--- a/debian/patches/license.patch
+++ b/debian/patches/license.patch
@@ -10,8 +10,10 @@ Origin: upstream, https://github.com/hlandau/rilts/blob/e4791634449efa0ae1a63046
 Last-Update: 2016-10-19
 ---
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: golang-gopkg-hlandau-easyconfig.v1.git/LICENSE
+===================================================================
 --- /dev/null
-+++ b/LICENSE
++++ golang-gopkg-hlandau-easyconfig.v1.git/LICENSE
 @@ -0,0 +1,5 @@
 +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 +

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details