Run of fresh-snapshots for golang-github-kisielk-sqlstruct

Try this locally (using silver-platter):

debian-svp new-upstream --snapshot golang-github-kisielk-sqlstruct 

Merge these changes:

git pull https://janitor.debian.net/git/golang-github-kisielk-sqlstruct fresh-snapshots/main

Summary

Merged new upstream version: 0.0~git20150917.0.0b86a3e+git20150923.648daed (was: 0.0~git20150917.0.0b86a3e).

Diff

=== added file '.gitignore'
--- a/.gitignore	1970-01-01 00:00:00 +0000
+++ b/.gitignore	2012-09-19 16:27:32 +0000
@@ -0,0 +1,22 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe

=== modified file 'debian/changelog'
--- a/debian/changelog	2018-04-02 22:34:08 +0000
+++ b/debian/changelog	2019-05-09 05:06:02 +0000
@@ -1,8 +1,12 @@
-golang-github-kisielk-sqlstruct (0.0~git20150917.0.0b86a3e-3) UNRELEASED; urgency=medium
+golang-github-kisielk-sqlstruct (0.0~git20150917.0.0b86a3e+git20150923.648daed-1) UNRELEASED; urgency=medium
 
+  [ Alexandre Viau ]
   * Point Vcs-* urls to salsa.debian.org.
 
- -- Alexandre Viau <aviau@debian.org>  Mon, 02 Apr 2018 18:34:08 -0400
+  [ Debian Janitor ]
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 09 May 2019 05:06:02 +0000
 
 golang-github-kisielk-sqlstruct (0.0~git20150917.0.0b86a3e-2) unstable; urgency=medium
 

=== modified file 'sqlstruct.go'
--- a/sqlstruct.go	2015-09-21 22:54:41 +0000
+++ b/sqlstruct.go	2019-05-09 05:06:02 +0000
@@ -1,6 +1,6 @@
 // Copyright 2012 Kamil Kisiel. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
+// Use of this source code is governed by the MIT
+// license which can be found in the LICENSE file.
 
 /*
 Package sqlstruct provides some convenience functions for using structs with
@@ -91,18 +91,16 @@
 	"sync"
 )
 
-// NameMapper is used to convert struct fields which do not have sql tags
-// into database column names. The default mapper is a no-op.
-//
-// Example override usage:
-//
-//  FirstName => first_name
+// NameMapper is the function used to convert struct fields which do not have sql tags
+// into database column names.
+//
+// The default mapper converts field names to lower case. If instead you would prefer
+// field names converted to snake case, simply assign sqlstruct.ToSnakeCase to the variable:
+//
 //		sqlstruct.NameMapper = sqlstruct.ToSnakeCase
 //
-//  Any func(string)string can be used
-//
-//
-var NameMapper = strings.ToLower
+// Alternatively for a custom mapping, any func(string) string can be used instead.
+var NameMapper func(string) string = strings.ToLower
 
 // A cache of fieldInfos to save reflecting every time. Inspried by encoding/xml
 var finfos map[reflect.Type]fieldInfo
@@ -260,6 +258,8 @@
 	return rows.Scan(values...)
 }
 
+// ToSnakeCase converts a string to snake case, words separated with underscores.
+// It's intended to be used with NameMapper to map struct field names to snake case database fields.
 func ToSnakeCase(src string) string {
 	thisUpper := false
 	prevUpper := false

=== modified file 'sqlstruct_test.go'
--- a/sqlstruct_test.go	2015-09-21 22:54:41 +0000
+++ b/sqlstruct_test.go	2019-05-09 05:06:02 +0000
@@ -1,6 +1,6 @@
 // Copyright 2012 Kamil Kisiel. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
+// Use of this source code is governed by the MIT
+// license which can be found in the LICENSE file.
 package sqlstruct
 
 import (

Full build log Full worker log