[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New to the package and new to the go



Dear Ricardo,

Greetings! I realise that you sent this email back in October, but since
that time I myself have become a member of the Debian Go Packaging Team
and can answer your question. I hope it is still useful given the delay!

> Looking for Orphans packages I've been realized there are some packages from golang.
>
> And how I was planning to study go, it could be a good opportunity to learn both at same time.
>
> I choose a simple package on wnpp [0].
>
> So, I have some questions:
>
> My first question a go related question. In the upstream repo, I found out a example in the README. And the program import the modules:
>
> import (
> 	"image/png"
> 	"os"
>
> 	"github.com/boombuler/barcode"
> 	"github.com/boombuler/barcode/qr"
> )
>
> So, my question:
>
> 1) When I install the package golang-barcode-dev (apt install golang-barcode-dev), the go uses the package installed locally, or pushes the code from github?

By default, the Go tool (go build, go mod etc.) will download the
'upstream' package from GitHub (technically it uses a proxy between you
and GitHub, but that is not important for most cases). However, the Go
tool has an alternative, older mode called 'gopath' mode, in which it
will look for the package in a specific location on your filesystem, and
won't download it from the internet. See this site to learn how to
change between the new mode and the old one:

https://maelvls.dev/go111module-everywhere/

This second, older mode is what Debian uses, because it allows for
reproducible and offline builds of Go packages. However, it does require
quite a bit of work to package all the dependencies in Debian, so that's
the main reason why this team exists!

> 2) Was it a good choice to start?

Yes, it's a fine choice, and we can help you if you get stuck on
anything :)

> 3) I've already a user on salsa. So, the first thing to do is fork the repo [1], correct?

Yes, that's right. We make changes on a branch in our personal fork, and
then make merge requests (also called pull requests) to the main
one. It's usually OK to push directly if you know you are the only
person maintaining it though. Nothing in Git can't be un-done :)

> 4) I've read [2] and [3], but I'm still a bit confused.

Anything specific we can help you with related to those two sites?

Hope this helps! Please let me know if there's anything I left
unexplained.

Best wishes,

Sebastian


Reply to: