[pkg-go] Code review: golang-github-danverbraganza-varcaser

Tong Sun pkgoyq.xpt at neverbox.com
Sun Jun 17 15:15:22 BST 2018


Finally! I was able to make my first build successfully!

Hi All,

This is my first Go package, and it now builds (kind of). Please
review it for me before I make my next step.

The project is at
https://salsa.debian.org/go-team/packages/golang-github-danverbraganza-varcaser
and my changes are at
https://salsa.debian.org/go-team/packages/golang-github-danverbraganza-varcaser/commits/debian/sid

Known problem (that I don't know how to fix)


- gbp clone it is problematic:

$ gbp clone git at salsa.debian.org:go-team/packages/golang-github-danverbraganza-varcaser.git
gbp:info: Cloning from
'git at salsa.debian.org:go-team/packages/golang-github-danverbraganza-varcaser.git'
gbp:error: Git command failed: Error running git checkout: error:
pathspec 'master' did not match any file(s) known to git.



- debian/docs is failing my build:

. . .
=== RUN   TestCaserLowerCamelInitialCapital
--- PASS: TestCaserLowerCamelInitialCapital (0.00s)
=== RUN   TestCaserIsATransformer
--- PASS: TestCaserIsATransformer (0.00s)
PASS
ok      github.com/danverbraganza/varcaser/varcaser     0.004s
   create-stamp debian/debhelper-build-stamp
 fakeroot debian/rules binary
dh binary --buildsystem=golang --with=golang
   dh_testroot -O--buildsystem=golang
   dh_prep -O--buildsystem=golang
   dh_auto_install -O--buildsystem=golang
        cd obj-x86_64-linux-gnu && mkdir -p
/build/golang-github-danverbraganza-varcaser-0.0\~git20151108.ce61ec4/debian/golang-github-danverbraganza-varcaser-dev/usr/share/gocode/src/github.com/danverbraganza/varcaser
        cd obj-x86_64-linux-gnu && cp -r -T
src/github.com/danverbraganza/varcaser
/build/golang-github-danverbraganza-varcaser-0.0\~git20151108.ce61ec4/debian/golang-github-danverbraganza-varcaser-dev/usr/share/gocode/src/github.com/danverbraganza/varcaser
   dh_installdocs -O--buildsystem=golang
dh_installdocs: Cannot find (any matches for) "Varcaser" (tried in .,
debian/tmp)

make: *** [debian/rules:4: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess
returned exit status 2
I: copying local configuration
E: Failed autobuilding of package
I: unmounting dev/ptmx filesystem
. . .
I: unmounting sys filesystem
I: Cleaning COW directory
I: forking: rm -rf /var/cache/pbuilder/build/cow.41098
gbp:error: 'git-pbuilder' failed: it exited with 1

$ dir debian/docs
lrwxrwxrwx 1 u u 12 2018-06-16 00:06 debian/docs -> ../README.md

rm debian/docs
gbp buildpackage --git-pbuilder --git-ignore-new

then it is ok. The whole build log is posted at
http://paste.debian.net/1029585/

Please help review. Thx!



More information about the Pkg-go-maintainers mailing list