Hi,
I would like to be able to extract the VCS branch name used during build.
Currently I append "-X main.BranchName=${BRANCH}" to the build line which
works, but I was hoping there might be a cunning way to extract this from
runtime/debug?
Thanks,
-Steve
--
You received this message becaus
You can use go:generate and go:embed to achieve this. In our CI/CD pipeline
we generate a json file with a lot of information like vcs, branch, tag,
date and time, hash and a lot more. Then we embed this json into the binary.
I became aware of this technique from
https://levelup.gitconnected.com/a
Some data might have been read even if err != nil. Maybe always printing
out msg could give you a hint?
https://pkg.go.dev/bufio#Reader.ReadBytes
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving e
Hello all
I am using go crypto libs to create x509 certificate requests (CSR) and
certificates. I noticed that CSR template extra extensions become CSR
template attributes in case I need to marshal / unmarshal csr templates.
For instance, below is a simple code that shows this behaviour:
c
Filed under https://github.com/golang/go/issues/58369.
--
Lucas Christian
Staff Software Engineer, Voice and SIP Connectivity
On Fri, Feb 3, 2023 at 2:14 PM Ian Lance Taylor wrote:
> On Fri, Feb 3, 2023 at 1:48 PM Lucas Christian
> wrote:
> >
> > Thanks for the reply and confirmation—theoretic
I'm getting the error
panic: json: cannot unmarshal string into Go value of type
map[string]*json.RawMessage but it does not tell me which line or section
of my json is causing the issue. How can I see this?
--
You received this message because you are subscribed to the Google Groups
"golan
Do you really need the branch? You get the commit hash for free since Go
1.18 : https://tip.golang.org/doc/go1.18#go-version
You can see the embedded version information with: go version -m
On Monday, 6 February 2023 at 17:33:53 UTC burker...@gmail.com wrote:
> You can use go:generate and go:e
The best method I've found is to wrap the input reader in something that
keeps track of lines. You can then type-assert the errors to one of the
exported error types in the json package to get the offset the error
occured and translate it into line numbers using your wrapper.
I have a package for s
On Mon, Feb 6, 2023 at 4:50 PM 'Axel Wagner' via golang-nuts
wrote:
>
> The best method I've found is to wrap the input reader in something that
> keeps track of lines. You can then type-assert the errors to one of the
> exported error types in the json package to get the offset the error occure